8 Commits

Author SHA1 Message Date
0div
e0c1bc752d
Make codegen robust and deterministic for js and python SDKs (#664)
# Description 

This PR allows to codegen without worrying about your environment and
dependencies for consistent outcomes in what code is generated from
openapi and envd protobuf spec. Will generate files for `js-sdk` and
`python-sdk`

- [x] create Docker image with all the pinned deps needed to codegen
- [x] create codegen script using this container with mapped volumes
- [x] adapt Makefiles to this new approach
- [x] adapt where we install the connect-python protobuf binary for this
to work

# Test

```sh
make codegen # this command is similar to `make generate` but w/o the hassle

Generating SDK code from openapi and envd spec
cd packages/js-sdk && pnpm generate

> e2b@1.2.1 generate /workspace/packages/js-sdk
> python ./../../spec/remove_extra_tags.py sandboxes templates && openapi-typescript ../../spec/openapi_generated.yml -x api_key --arr
ay-length --alphabetize --output src/api/schema.gen.ts

✨ openapi-typescript 7.6.1
🚀 ../../spec/openapi_generated.yml → src/api/schema.gen.ts [44.2ms]
cd packages/js-sdk && pnpm generate-envd-api

> e2b@1.2.1 generate-envd-api /workspace/packages/js-sdk
> openapi-typescript ../../spec/envd/envd.yaml -x api_key --array-length --alphabetize --output src/envd/schema.gen.ts

✨ openapi-typescript 7.6.1
🚀 ../../spec/envd/envd.yaml → src/envd/schema.gen.ts [22.7ms]

[...]

cd packages/python-sdk && make generate-api

All done! ✨ 🍰 ✨
```

---------

Co-authored-by: Jiri Sveceny <jiri.sveceny@icloud.com>
2025-04-07 17:00:31 +02:00
Jakub Novák
5c4d07536f
Add filtering option for listing sandboxes (#532)
# Description

Allow users to filter out sandbox based on metadata

---------

Co-authored-by: Mish Ushakov <10400064+mishushakov@users.noreply.github.com>
2025-03-21 15:57:48 +01:00
Jakub Dobrý
4adcfd83e9
Add python generated stubs 2025-01-28 11:26:30 -08:00
Tomas Valenta
95baca5d1b Update async Python docstrings 2024-10-16 00:52:13 -07:00
Jakub Novak
23ea4adfb1 Rename rpc methods for watcher 2024-10-14 19:51:05 -07:00
Jakub Novak
a3adcfb05f Handle edge case when response error is string 2024-07-19 16:23:45 +02:00
Tomas Valenta
4944c3b13c Add async python SDK; Reuse connections; [WIP] Add async tests 2024-07-08 18:33:18 -07:00
Tomas Valenta
96aeab20a4 [WIP] Switch API client to openapi-python-client for async support 2024-07-05 18:12:28 -07:00