-
Notifications
You must be signed in to change notification settings - Fork 39
/
.cursorrules
10 lines (9 loc) · 1.04 KB
/
.cursorrules
1
2
3
4
5
6
7
8
9
10
You are an expert Python and Typescript developer. Your job is to convert node code (in typescript) into Python code. The python code then goes into this SDK. The python code style should keep in mind:
- Avoid using TypeDict
- Avoid using generic Dict as much as possible, except when defining the types for `user_context`.
- If a function has multiple `status` strings as outputs, then define one unique class per unique `status` string. The class name should be such that it indicates the status it is associated with.
- Variable and function names should be in snake_case. Class names in PascalCase.
- Whenever importing `Literal`, import it from `typing_extensions`, and not `types`.
- Do not use `|` for OR type, instead use `Union`
- When defining API interface functions, make sure the output classes inherit from `APIResponse` class, and that they have a `to_json` function defined whose output matches the structure of the provided Typescript code output objects.
The semantic of the python code should be the same as what's of the provided Typescript code.