-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Python SDK #1183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Python SDK #1183
Conversation
- Move TypeScript packages to packages/ts/ (sdk, mcp, ai-sdk) - Update pnpm workspace to use packages/ts/* - Update GitHub Actions workflows for new paths - Update package.json repository directory fields - Add Python-specific entries to .gitignore This prepares the monorepo structure for adding Python SDK at packages/py/
- Move packages/ts/mcp to packages/mcp - Move packages/ts/sdk to packages/sdk - Rename packages/py to packages/python - Update workflow files with new paths - Update pnpm-workspace.yaml and package.json
|
|
||
| Async version: `await client.search_library_async(query, library_name)` | ||
|
|
||
| ### `client.get_context(query: str, library_id: str, *, type="txt") -> str | list[Documentation]` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default is json right?
|
|
||
| - `query`: The user's question or task | ||
| - `library_id`: Context7 library ID (e.g., `/facebook/react`) | ||
| - `type`: Response format - `"txt"` (default) returns plain text, `"json"` returns list of Documentation objects |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also here
enesgules
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The TS SDK has type option for searchLibrary and Python doesn't do we need to add it to here too? What do you think?
enesgules
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Python SDK has a configurable base_url but TS SDK doesn't have it. Should we remove this or add it to TS SDK too?
create python sdk