Skip to content

update library#13

Merged
lgguzman merged 2 commits intomasterfrom
extend_library
Mar 16, 2026
Merged

update library#13
lgguzman merged 2 commits intomasterfrom
extend_library

Conversation

@lgguzman
Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown

@toki-sbx toki-sbx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review — PR #13 update library (@lgguzman)

Overall this is a solid and useful extension. The new methods follow existing patterns and the README + CLAUDE.md docs are a great addition. A few things worth addressing:

🔴 Bugs / Artifacts

README.md has a stray /cl# prefix on line ~6 of the new section:

/cl# SBXCloud Project

Looks like a copy-paste artifact. Should just be # SBXCloud Project.

🟡 Consistency / Minor

Python version mismatch: README updates the minimum Python version from 3.5 → 3.13, but pyproject.toml is not changed in this PR. If 3.13 is the real target, pyproject.toml should reflect that too.

create_cloudscript default script='{}': The default is an empty JSON object string, which is probably fine but a bit unusual — consider script='' or documenting what the expected format is.

🟢 What's Good

  • create_model, create_field, and all cloudscript CRUD methods follow the exact same aiohttp.ClientSession pattern as the rest of the codebase — consistent and clean.
  • REFERENCE type handling in create_field is correct.
  • New URL entries in urls dict are well-organized.
  • CLAUDE.md is thorough and accurate — good AI context file.
  • README is a huge improvement over the original one-liner.

Fix the /cl# artifact and consider syncing the Python version in pyproject.toml, then this looks good to merge.

Copy link
Copy Markdown

@toki-sbx toki-sbx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review — PR #13 update library (@lgguzman)

Thanks for the ping. After a closer look at the patch, I found one more issue worth fixing before merge.

🔴 New finding: create_model and create_field use query params for POST

Both new methods send data as URL query parameters (params=) on a POST request:

async def create_model(self, name):
    params = {'domain': ..., 'name': name}
    async with session.post(self.p(self.urls['model']), params=params, ...)

This is inconsistent with create_cloudscript and update_cloudscript in the same PR, which correctly send data in the request body (json=). For REST POST/PUT endpoints, data should typically go in the body, not the query string. If the API actually expects query params here, it should be documented — otherwise this is likely a bug.

🔴 README artifact still present

/cl# on the section header is still in the diff and needs to be removed.

🟡 pyproject.toml version still out of sync

Python version bump (3.5 → 3.13) in README isn't reflected in pyproject.toml.

🟡 create_cloudscript default script='{}'

Minor: the default is an empty JSON object string. Consider script='' or adding a docstring clarifying expected format.


Fix create_model/create_field to use json= body (or confirm params is correct for that API endpoint), clean the README artifact, and this is ready.

Copy link
Copy Markdown

@toki-sbx toki-sbx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up — clarifications from @lgguzman

Thanks for the context! A few items are now resolved:

  • create_model / create_field use params= — confirmed the API expects query params here. No change needed.
  • /cl# README artifact — confirmed removed.
  • pyproject.toml Python version — confirmed matches 3.12 with the README now.

All open items are resolved. This is good to merge. 🚀

@lgguzman lgguzman merged commit 7e8f0d5 into master Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants