├── docs ├── module.rst ├── _static │ └── .gitkeep ├── _templates │ └── .gitkeep ├── .gitignore ├── pyproject.toml ├── Makefile ├── make.bat └── conf.py ├── .python-version ├── CHANGELOG.md ├── scaleway-async ├── scaleway_async │ ├── py.typed │ ├── std │ │ ├── api.py │ │ ├── marshalling.py │ │ └── __init__.py │ ├── block │ │ ├── __init__.py │ │ ├── v1 │ │ │ └── content.py │ │ └── v1alpha1 │ │ │ └── content.py │ ├── domain │ │ ├── __init__.py │ │ └── v2beta1 │ │ │ └── content.py │ ├── file │ │ ├── __init__.py │ │ └── v1alpha1 │ │ │ ├── content.py │ │ │ └── __init__.py │ ├── iam │ │ └── __init__.py │ ├── iot │ │ ├── __init__.py │ │ └── v1 │ │ │ └── content.py │ ├── ipam │ │ ├── __init__.py │ │ └── v1 │ │ │ └── __init__.py │ ├── ipfs │ │ ├── __init__.py │ │ └── v1alpha1 │ │ │ └── content.py │ ├── jobs │ │ ├── __init__.py │ │ └── v1alpha1 │ │ │ └── content.py │ ├── k8s │ │ ├── __init__.py │ │ └── v1 │ │ │ └── content.py │ ├── kafka │ │ ├── __init__.py │ │ └── v1alpha1 │ │ │ └── content.py │ ├── lb │ │ ├── __init__.py │ │ └── v1 │ │ │ └── content.py │ ├── mnq │ │ └── __init__.py │ ├── qaas │ │ ├── __init__.py │ │ └── v1alpha1 │ │ │ └── content.py │ ├── rdb │ │ ├── __init__.py │ │ └── v1 │ │ │ └── content.py │ ├── redis │ │ ├── __init__.py │ │ └── v1 │ │ │ └── content.py │ ├── secret │ │ └── __init__.py │ ├── tem │ │ ├── __init__.py │ │ └── v1alpha1 │ │ │ └── content.py │ ├── test │ │ ├── __init__.py │ │ └── v1 │ │ │ ├── content.py │ │ │ └── __init__.py │ ├── vpc │ │ ├── __init__.py │ │ └── v1 │ │ │ └── __init__.py │ ├── vpcgw │ │ ├── __init__.py │ │ ├── v1 │ │ │ └── content.py │ │ └── v2 │ │ │ └── content.py │ ├── account │ │ ├── __init__.py │ │ └── v2 │ │ │ └── __init__.py │ ├── audit_trail │ │ └── __init__.py │ ├── autoscaling │ │ └── __init__.py │ ├── baremetal │ │ ├── __init__.py │ │ ├── v3 │ │ │ ├── content.py │ │ │ └── __init__.py │ │ └── v1 │ │ │ └── content.py │ ├── billing │ │ ├── __init__.py │ │ └── v2alpha1 │ │ │ └── __init__.py │ ├── cockpit │ │ ├── __init__.py │ │ └── v1beta1 │ │ │ └── content.py │ ├── container │ │ ├── __init__.py │ │ └── v1beta1 │ │ │ └── content.py │ ├── dedibox │ │ └── __init__.py │ ├── document_db │ │ ├── __init__.py │ │ └── v1beta1 │ │ │ └── content.py │ ├── flexibleip │ │ ├── __init__.py │ │ └── v1alpha1 │ │ │ ├── content.py │ │ │ └── __init__.py │ ├── function │ │ ├── __init__.py │ │ └── v1beta1 │ │ │ └── content.py │ ├── inference │ │ ├── __init__.py │ │ ├── v1beta1 │ │ │ └── content.py │ │ └── v1 │ │ │ └── content.py │ ├── instance │ │ └── __init__.py │ ├── interlink │ │ ├── __init__.py │ │ └── v1beta1 │ │ │ └── content.py │ ├── key_manager │ │ └── __init__.py │ ├── marketplace │ │ ├── __init__.py │ │ └── v2 │ │ │ └── __init__.py │ ├── mongodb │ │ ├── __init__.py │ │ ├── v1 │ │ │ ├── content.py │ │ │ └── custom_api.py │ │ └── v1alpha1 │ │ │ ├── content.py │ │ │ └── custom_api.py │ ├── registry │ │ ├── __init__.py │ │ └── v1 │ │ │ ├── content.py │ │ │ └── __init__.py │ ├── s2s_vpn │ │ ├── __init__.py │ │ └── v1alpha1 │ │ │ └── content.py │ ├── webhosting │ │ ├── __init__.py │ │ ├── v1alpha1 │ │ │ └── content.py │ │ └── v1 │ │ │ └── content.py │ ├── applesilicon │ │ ├── __init__.py │ │ └── v1alpha1 │ │ │ └── content.py │ ├── datawarehouse │ │ ├── __init__.py │ │ └── v1beta1 │ │ │ └── content.py │ ├── edge_services │ │ ├── __init__.py │ │ ├── v1beta1 │ │ │ └── content.py │ │ └── v1alpha1 │ │ │ └── content.py │ ├── product_catalog │ │ └── __init__.py │ ├── serverless_sqldb │ │ ├── __init__.py │ │ └── v1alpha1 │ │ │ ├── content.py │ │ │ └── __init__.py │ ├── environmental_footprint │ │ ├── __init__.py │ │ └── v1alpha1 │ │ │ └── __init__.py │ └── __init__.py ├── README.md └── tests │ └── utils.py ├── scaleway-core ├── scaleway_core │ ├── py.typed │ ├── validations │ │ ├── __init__.py │ │ └── string_validation.py │ ├── __init__.py │ ├── bridge │ │ ├── region.py │ │ ├── zone.py │ │ ├── decimal.py │ │ ├── scwfile.py │ │ ├── __init__.py │ │ ├── serviceinfo.py │ │ └── money.py │ ├── profile │ │ ├── file.py │ │ ├── __init__.py │ │ └── env.py │ └── utils │ │ ├── strenummeta.py │ │ ├── validate_path_param.py │ │ ├── project_or_organization_id.py │ │ ├── __init__.py │ │ └── resolve_one_of.py ├── README.md └── tests │ ├── test_bridge_marshal.py │ ├── utils.py │ └── test_profile_env.py ├── scaleway ├── scaleway │ ├── vpc │ │ ├── v2 │ │ │ └── tests │ │ │ │ ├── __init__.py │ │ │ │ └── cassettes │ │ │ │ ├── test_vpc_get.cassette.yaml │ │ │ │ ├── test_vpc_update.cassette.yaml │ │ │ │ └── vpc.cassette.yaml │ │ ├── __init__.py │ │ └── v1 │ │ │ └── __init__.py │ ├── instance │ │ ├── v1 │ │ │ ├── tests │ │ │ │ ├── __init__.py │ │ │ │ └── cassettes │ │ │ │ │ └── test_set_and_get_server_user_data.cassette.yaml │ │ │ ├── custom_types.py │ │ │ └── custom_marshalling.py │ │ └── __init__.py │ ├── std │ │ ├── api.py │ │ ├── marshalling.py │ │ └── __init__.py │ ├── iam │ │ └── __init__.py │ ├── iot │ │ ├── __init__.py │ │ └── v1 │ │ │ └── content.py │ ├── k8s │ │ ├── __init__.py │ │ └── v1 │ │ │ ├── content.py │ │ │ └── tests │ │ │ └── test_k8s_sk.py │ ├── lb │ │ ├── __init__.py │ │ └── v1 │ │ │ └── content.py │ ├── mnq │ │ └── __init__.py │ ├── rdb │ │ ├── __init__.py │ │ └── v1 │ │ │ └── content.py │ ├── tem │ │ ├── __init__.py │ │ └── v1alpha1 │ │ │ └── content.py │ ├── account │ │ ├── __init__.py │ │ └── v2 │ │ │ └── __init__.py │ ├── billing │ │ ├── __init__.py │ │ ├── v2alpha1 │ │ │ └── __init__.py │ │ └── v2beta1 │ │ │ └── __init__.py │ ├── block │ │ ├── __init__.py │ │ ├── v1 │ │ │ └── content.py │ │ └── v1alpha1 │ │ │ └── content.py │ ├── cockpit │ │ ├── __init__.py │ │ └── v1beta1 │ │ │ └── content.py │ ├── dedibox │ │ └── __init__.py │ ├── domain │ │ ├── __init__.py │ │ └── v2beta1 │ │ │ └── content.py │ ├── file │ │ ├── __init__.py │ │ └── v1alpha1 │ │ │ ├── content.py │ │ │ └── __init__.py │ ├── function │ │ ├── __init__.py │ │ └── v1beta1 │ │ │ └── content.py │ ├── ipam │ │ ├── __init__.py │ │ └── v1 │ │ │ └── __init__.py │ ├── ipfs │ │ ├── __init__.py │ │ └── v1alpha1 │ │ │ └── content.py │ ├── jobs │ │ ├── __init__.py │ │ └── v1alpha1 │ │ │ └── content.py │ ├── kafka │ │ ├── __init__.py │ │ └── v1alpha1 │ │ │ └── content.py │ ├── mongodb │ │ ├── __init__.py │ │ ├── v1 │ │ │ ├── content.py │ │ │ ├── tests │ │ │ │ ├── README.md │ │ │ │ └── test_custom_api.py │ │ │ └── custom_api.py │ │ └── v1alpha1 │ │ │ ├── content.py │ │ │ └── custom_api.py │ ├── qaas │ │ ├── __init__.py │ │ └── v1alpha1 │ │ │ └── content.py │ ├── redis │ │ ├── __init__.py │ │ └── v1 │ │ │ └── content.py │ ├── registry │ │ ├── __init__.py │ │ └── v1 │ │ │ ├── content.py │ │ │ └── __init__.py │ ├── s2s_vpn │ │ ├── __init__.py │ │ └── v1alpha1 │ │ │ └── content.py │ ├── secret │ │ └── __init__.py │ ├── test │ │ ├── __init__.py │ │ └── v1 │ │ │ ├── content.py │ │ │ └── __init__.py │ ├── vpcgw │ │ ├── __init__.py │ │ ├── v1 │ │ │ └── content.py │ │ └── v2 │ │ │ └── content.py │ ├── applesilicon │ │ ├── __init__.py │ │ └── v1alpha1 │ │ │ └── content.py │ ├── audit_trail │ │ └── __init__.py │ ├── autoscaling │ │ └── __init__.py │ ├── baremetal │ │ ├── __init__.py │ │ ├── v3 │ │ │ ├── content.py │ │ │ └── __init__.py │ │ └── v1 │ │ │ └── content.py │ ├── container │ │ ├── __init__.py │ │ └── v1beta1 │ │ │ └── content.py │ ├── datawarehouse │ │ ├── __init__.py │ │ └── v1beta1 │ │ │ └── content.py │ ├── document_db │ │ ├── __init__.py │ │ └── v1beta1 │ │ │ └── content.py │ ├── edge_services │ │ ├── __init__.py │ │ ├── v1beta1 │ │ │ └── content.py │ │ └── v1alpha1 │ │ │ └── content.py │ ├── flexibleip │ │ ├── __init__.py │ │ └── v1alpha1 │ │ │ ├── content.py │ │ │ └── __init__.py │ ├── inference │ │ ├── __init__.py │ │ ├── v1beta1 │ │ │ └── content.py │ │ └── v1 │ │ │ └── content.py │ ├── interlink │ │ ├── __init__.py │ │ └── v1beta1 │ │ │ └── content.py │ ├── key_manager │ │ └── __init__.py │ ├── marketplace │ │ ├── __init__.py │ │ └── v2 │ │ │ └── __init__.py │ ├── webhosting │ │ ├── __init__.py │ │ ├── v1alpha1 │ │ │ └── content.py │ │ └── v1 │ │ │ └── content.py │ ├── product_catalog │ │ └── __init__.py │ ├── serverless_sqldb │ │ ├── __init__.py │ │ └── v1alpha1 │ │ │ ├── content.py │ │ │ └── __init__.py │ ├── environmental_footprint │ │ ├── __init__.py │ │ └── v1alpha1 │ │ │ └── __init__.py │ └── __init__.py ├── README.md └── tests │ └── utils.py ├── .gitignore ├── .github ├── ISSUE_TEMPLATE │ ├── config.yml │ ├── feature_request.md │ └── bug_report.md ├── workflows │ ├── labeler.yml │ ├── format.yml │ ├── checks.yml │ ├── pytest-cov.yml │ ├── lint.yml │ ├── docs.yml │ └── nightly.yml ├── dependabot.yml └── pull_request_template.md ├── MAINTAINERS.md ├── SECURITY.md ├── README.md └── Makefile /docs/module.rst: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/_static/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.python-version: -------------------------------------------------------------------------------- 1 | 3.8.14 2 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | -------------------------------------------------------------------------------- /docs/_templates/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/py.typed: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /scaleway-core/scaleway_core/py.typed: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | ./source 2 | ./_build 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/vpc/v2/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /scaleway/scaleway/instance/v1/tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /scaleway-core/scaleway_core/validations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /scaleway-async/README.md: -------------------------------------------------------------------------------- 1 | # Scaleway Python SDK - Async 2 | -------------------------------------------------------------------------------- /scaleway-core/README.md: -------------------------------------------------------------------------------- 1 | # Scaleway Python SDK - Core 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Python compiled 2 | __pycache__/ 3 | 4 | # Poetry 5 | dist/ 6 | 7 | # macOS 8 | .DS_Store 9 | -------------------------------------------------------------------------------- /scaleway/README.md: -------------------------------------------------------------------------------- 1 | # Scaleway Python SDK 2 | 3 | This SDK enables you to interact with Scaleway APIs. 4 | -------------------------------------------------------------------------------- /scaleway/scaleway/std/api.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/iam/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/iot/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/k8s/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/lb/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/mnq/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/rdb/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/tem/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/vpc/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/account/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/billing/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/block/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/cockpit/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/dedibox/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/domain/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/file/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/function/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/instance/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/ipam/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/ipfs/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/jobs/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/kafka/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/mongodb/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/qaas/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/redis/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/registry/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/s2s_vpn/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/secret/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/test/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/vpcgw/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/std/api.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/applesilicon/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/audit_trail/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/autoscaling/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/baremetal/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/container/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/datawarehouse/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/document_db/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/edge_services/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/flexibleip/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/inference/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/interlink/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/key_manager/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/marketplace/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/webhosting/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/block/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/domain/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/file/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/iam/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/iot/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/ipam/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/ipfs/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/jobs/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/k8s/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/kafka/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/lb/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/mnq/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/qaas/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/rdb/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/redis/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/secret/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/tem/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/test/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/vpc/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/vpcgw/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-core/scaleway_core/__init__.py: -------------------------------------------------------------------------------- 1 | """Scaleway SDK for Python - Core""" 2 | 3 | import importlib.metadata 4 | 5 | __version__: str = importlib.metadata.version(__name__) 6 | -------------------------------------------------------------------------------- /scaleway/scaleway/product_catalog/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/serverless_sqldb/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/std/marshalling.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | 5 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/account/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/audit_trail/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/autoscaling/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/baremetal/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/billing/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/cockpit/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/container/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/dedibox/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/document_db/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/flexibleip/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/function/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/inference/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/instance/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/interlink/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/key_manager/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/marketplace/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/mongodb/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/registry/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/s2s_vpn/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/webhosting/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway/scaleway/environmental_footprint/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/applesilicon/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/datawarehouse/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/edge_services/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/product_catalog/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/serverless_sqldb/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/std/marshalling.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | 5 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/environmental_footprint/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | -------------------------------------------------------------------------------- /scaleway-core/scaleway_core/bridge/region.py: -------------------------------------------------------------------------------- 1 | Region = str 2 | REGION_FR_PAR = Region("fr-par") 3 | REGION_NL_AMS = Region("nl-ams") 4 | REGION_PL_WAW = Region("pl-waw") 5 | 6 | ALL_REGIONS = [ 7 | REGION_FR_PAR, 8 | REGION_NL_AMS, 9 | REGION_PL_WAW, 10 | ] 11 | -------------------------------------------------------------------------------- /scaleway/scaleway/std/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | from .types import CountryCode 4 | from .types import LanguageCode 5 | 6 | __all__ = [ 7 | "CountryCode", 8 | "LanguageCode", 9 | ] 10 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/std/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | from .types import CountryCode 4 | from .types import LanguageCode 5 | 6 | __all__ = [ 7 | "CountryCode", 8 | "LanguageCode", 9 | ] 10 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Scaleway Community 4 | url: https://slack.scaleway.com 5 | about: GitHub issues in this repository are only intended for bug reports and feature requests. Other issues will be closed. Please ask questions on the Scaleway Community Slack (#sdk-python) 6 | -------------------------------------------------------------------------------- /scaleway-core/scaleway_core/profile/file.py: -------------------------------------------------------------------------------- 1 | CONFIG_PROPERTIES_TO_PROFILE = { 2 | "access_key": "access_key", 3 | "secret_key": "secret_key", 4 | "api_url": "api_url", 5 | "default_organization_id": "default_organization_id", 6 | "default_project_id": "default_project_id", 7 | "default_region": "default_region", 8 | "default_zone": "default_zone", 9 | } 10 | -------------------------------------------------------------------------------- /scaleway/scaleway/test/v1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | HumanStatus, 6 | ) 7 | 8 | HUMAN_TRANSIENT_STATUSES: list[HumanStatus] = [ 9 | HumanStatus.RUNNING, 10 | ] 11 | """ 12 | Lists transient statutes of the enum :class:`HumanStatus `. 13 | """ 14 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/test/v1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | HumanStatus, 6 | ) 7 | 8 | HUMAN_TRANSIENT_STATUSES: list[HumanStatus] = [ 9 | HumanStatus.RUNNING, 10 | ] 11 | """ 12 | Lists transient statutes of the enum :class:`HumanStatus `. 13 | """ 14 | -------------------------------------------------------------------------------- /scaleway/scaleway/iot/v1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | HubStatus, 6 | ) 7 | 8 | HUB_TRANSIENT_STATUSES: list[HubStatus] = [ 9 | HubStatus.ENABLING, 10 | HubStatus.DISABLING, 11 | ] 12 | """ 13 | Lists transient statutes of the enum :class:`HubStatus `. 14 | """ 15 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/iot/v1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | HubStatus, 6 | ) 7 | 8 | HUB_TRANSIENT_STATUSES: list[HubStatus] = [ 9 | HubStatus.ENABLING, 10 | HubStatus.DISABLING, 11 | ] 12 | """ 13 | Lists transient statutes of the enum :class:`HubStatus `. 14 | """ 15 | -------------------------------------------------------------------------------- /.github/workflows/labeler.yml: -------------------------------------------------------------------------------- 1 | name: "Pull Request Labeler" 2 | permissions: 3 | actions: read 4 | 5 | on: 6 | - pull_request_target 7 | 8 | jobs: 9 | triage: 10 | permissions: 11 | contents: read 12 | pull-requests: write 13 | runs-on: ubuntu-latest 14 | steps: 15 | - name: Checkout 16 | uses: actions/checkout@v6 17 | - name: Labeler 18 | uses: actions/labeler@v6 19 | with: 20 | sync-labels: true 21 | -------------------------------------------------------------------------------- /scaleway/scaleway/jobs/v1alpha1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | JobRunState, 6 | ) 7 | 8 | JOB_RUN_TRANSIENT_STATUSES: list[JobRunState] = [ 9 | JobRunState.QUEUED, 10 | JobRunState.SCHEDULED, 11 | JobRunState.RUNNING, 12 | ] 13 | """ 14 | Lists transient statutes of the enum :class:`JobRunState `. 15 | """ 16 | -------------------------------------------------------------------------------- /scaleway/scaleway/file/v1alpha1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | FileSystemStatus, 6 | ) 7 | 8 | FILE_SYSTEM_TRANSIENT_STATUSES: list[FileSystemStatus] = [ 9 | FileSystemStatus.CREATING, 10 | FileSystemStatus.UPDATING, 11 | ] 12 | """ 13 | Lists transient statutes of the enum :class:`FileSystemStatus `. 14 | """ 15 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/jobs/v1alpha1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | JobRunState, 6 | ) 7 | 8 | JOB_RUN_TRANSIENT_STATUSES: list[JobRunState] = [ 9 | JobRunState.QUEUED, 10 | JobRunState.SCHEDULED, 11 | JobRunState.RUNNING, 12 | ] 13 | """ 14 | Lists transient statutes of the enum :class:`JobRunState `. 15 | """ 16 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/file/v1alpha1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | FileSystemStatus, 6 | ) 7 | 8 | FILE_SYSTEM_TRANSIENT_STATUSES: list[FileSystemStatus] = [ 9 | FileSystemStatus.CREATING, 10 | FileSystemStatus.UPDATING, 11 | ] 12 | """ 13 | Lists transient statutes of the enum :class:`FileSystemStatus `. 14 | """ 15 | -------------------------------------------------------------------------------- /MAINTAINERS.md: -------------------------------------------------------------------------------- 1 | This page lists all active maintainers of `scaleway-sdk-python`. This can be used for 2 | routing PRs, questions, etc. to the right place. 3 | 4 | - See [CONTRIBUTING.md](CONTRIBUTING.md) for general contribution guidelines. 5 | 6 | ### Maintainers 7 | 8 | | Name | Tag | 9 | | :---------------- | :----------------------------------------------- | 10 | | Nathanael Demacon | [@quantumsheep](https://github.com/quantumsheep) | 11 | -------------------------------------------------------------------------------- /scaleway/scaleway/kafka/v1alpha1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | ClusterStatus, 6 | ) 7 | 8 | CLUSTER_TRANSIENT_STATUSES: list[ClusterStatus] = [ 9 | ClusterStatus.CREATING, 10 | ClusterStatus.CONFIGURING, 11 | ClusterStatus.DELETING, 12 | ] 13 | """ 14 | Lists transient statutes of the enum :class:`ClusterStatus `. 15 | """ 16 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/kafka/v1alpha1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | ClusterStatus, 6 | ) 7 | 8 | CLUSTER_TRANSIENT_STATUSES: list[ClusterStatus] = [ 9 | ClusterStatus.CREATING, 10 | ClusterStatus.CONFIGURING, 11 | ClusterStatus.DELETING, 12 | ] 13 | """ 14 | Lists transient statutes of the enum :class:`ClusterStatus `. 15 | """ 16 | -------------------------------------------------------------------------------- /scaleway/scaleway/serverless_sqldb/v1alpha1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | DatabaseStatus, 6 | ) 7 | 8 | DATABASE_TRANSIENT_STATUSES: list[DatabaseStatus] = [ 9 | DatabaseStatus.CREATING, 10 | DatabaseStatus.DELETING, 11 | DatabaseStatus.RESTORING, 12 | ] 13 | """ 14 | Lists transient statutes of the enum :class:`DatabaseStatus `. 15 | """ 16 | -------------------------------------------------------------------------------- /scaleway/scaleway/cockpit/v1beta1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | from typing import List 4 | 5 | from .types import ( 6 | CockpitStatus, 7 | ) 8 | 9 | COCKPIT_TRANSIENT_STATUSES: List[CockpitStatus] = [ 10 | CockpitStatus.CREATING, 11 | CockpitStatus.DELETING, 12 | CockpitStatus.UPDATING, 13 | ] 14 | """ 15 | Lists transient statutes of the enum :class:`CockpitStatus `. 16 | """ 17 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/serverless_sqldb/v1alpha1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | DatabaseStatus, 6 | ) 7 | 8 | DATABASE_TRANSIENT_STATUSES: list[DatabaseStatus] = [ 9 | DatabaseStatus.CREATING, 10 | DatabaseStatus.DELETING, 11 | DatabaseStatus.RESTORING, 12 | ] 13 | """ 14 | Lists transient statutes of the enum :class:`DatabaseStatus `. 15 | """ 16 | -------------------------------------------------------------------------------- /scaleway/scaleway/s2s_vpn/v1alpha1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | VpnGatewayStatus, 6 | ) 7 | 8 | VPN_GATEWAY_TRANSIENT_STATUSES: list[VpnGatewayStatus] = [ 9 | VpnGatewayStatus.CONFIGURING, 10 | VpnGatewayStatus.PROVISIONING, 11 | VpnGatewayStatus.DEPROVISIONING, 12 | ] 13 | """ 14 | Lists transient statutes of the enum :class:`VpnGatewayStatus `. 15 | """ 16 | -------------------------------------------------------------------------------- /scaleway/scaleway/webhosting/v1alpha1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | from typing import List 4 | 5 | from .types import ( 6 | HostingStatus, 7 | ) 8 | 9 | HOSTING_TRANSIENT_STATUSES: List[HostingStatus] = [ 10 | HostingStatus.DELIVERING, 11 | HostingStatus.DELETING, 12 | HostingStatus.MIGRATING, 13 | ] 14 | """ 15 | Lists transient statutes of the enum :class:`HostingStatus `. 16 | """ 17 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/cockpit/v1beta1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | from typing import List 4 | 5 | from .types import ( 6 | CockpitStatus, 7 | ) 8 | 9 | COCKPIT_TRANSIENT_STATUSES: List[CockpitStatus] = [ 10 | CockpitStatus.CREATING, 11 | CockpitStatus.DELETING, 12 | CockpitStatus.UPDATING, 13 | ] 14 | """ 15 | Lists transient statutes of the enum :class:`CockpitStatus `. 16 | """ 17 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/webhosting/v1alpha1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | from typing import List 4 | 5 | from .types import ( 6 | HostingStatus, 7 | ) 8 | 9 | HOSTING_TRANSIENT_STATUSES: List[HostingStatus] = [ 10 | HostingStatus.DELIVERING, 11 | HostingStatus.DELETING, 12 | HostingStatus.MIGRATING, 13 | ] 14 | """ 15 | Lists transient statutes of the enum :class:`HostingStatus `. 16 | """ 17 | -------------------------------------------------------------------------------- /scaleway-core/tests/test_bridge_marshal.py: -------------------------------------------------------------------------------- 1 | import unittest 2 | from decimal import Decimal 3 | 4 | from scaleway_core.bridge import unmarshal_Decimal, marshal_Decimal 5 | 6 | 7 | class TestBridgeMarshal(unittest.TestCase): 8 | def test_decimal_marshal(self): 9 | decimal = Decimal("1.2") 10 | self.assertEqual(marshal_Decimal(decimal, None), {"value": "1.2"}) 11 | 12 | def test_decimal_unmarshal(self): 13 | decimal = Decimal("1.2") 14 | self.assertEqual(unmarshal_Decimal({"value": "1.2"}), decimal) 15 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/s2s_vpn/v1alpha1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | VpnGatewayStatus, 6 | ) 7 | 8 | VPN_GATEWAY_TRANSIENT_STATUSES: list[VpnGatewayStatus] = [ 9 | VpnGatewayStatus.CONFIGURING, 10 | VpnGatewayStatus.PROVISIONING, 11 | VpnGatewayStatus.DEPROVISIONING, 12 | ] 13 | """ 14 | Lists transient statutes of the enum :class:`VpnGatewayStatus `. 15 | """ 16 | -------------------------------------------------------------------------------- /scaleway/scaleway/baremetal/v3/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | ServerPrivateNetworkStatus, 6 | ) 7 | 8 | SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES: list[ServerPrivateNetworkStatus] = [ 9 | ServerPrivateNetworkStatus.ATTACHING, 10 | ServerPrivateNetworkStatus.DETACHING, 11 | ] 12 | """ 13 | Lists transient statutes of the enum :class:`ServerPrivateNetworkStatus `. 14 | """ 15 | -------------------------------------------------------------------------------- /scaleway/scaleway/inference/v1beta1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | DeploymentStatus, 6 | ) 7 | 8 | DEPLOYMENT_TRANSIENT_STATUSES: list[DeploymentStatus] = [ 9 | DeploymentStatus.CREATING, 10 | DeploymentStatus.DEPLOYING, 11 | DeploymentStatus.DELETING, 12 | DeploymentStatus.SCALING, 13 | ] 14 | """ 15 | Lists transient statutes of the enum :class:`DeploymentStatus `. 16 | """ 17 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/baremetal/v3/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | ServerPrivateNetworkStatus, 6 | ) 7 | 8 | SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES: list[ServerPrivateNetworkStatus] = [ 9 | ServerPrivateNetworkStatus.ATTACHING, 10 | ServerPrivateNetworkStatus.DETACHING, 11 | ] 12 | """ 13 | Lists transient statutes of the enum :class:`ServerPrivateNetworkStatus `. 14 | """ 15 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/inference/v1beta1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | DeploymentStatus, 6 | ) 7 | 8 | DEPLOYMENT_TRANSIENT_STATUSES: list[DeploymentStatus] = [ 9 | DeploymentStatus.CREATING, 10 | DeploymentStatus.DEPLOYING, 11 | DeploymentStatus.DELETING, 12 | DeploymentStatus.SCALING, 13 | ] 14 | """ 15 | Lists transient statutes of the enum :class:`DeploymentStatus `. 16 | """ 17 | -------------------------------------------------------------------------------- /scaleway-core/scaleway_core/bridge/zone.py: -------------------------------------------------------------------------------- 1 | Zone = str 2 | ZONE_FR_PAR_1 = Zone("fr-par-1") 3 | ZONE_FR_PAR_2 = Zone("fr-par-2") 4 | ZONE_FR_PAR_3 = Zone("fr-par-3") 5 | ZONE_NL_AMS_1 = Zone("nl-ams-1") 6 | ZONE_NL_AMS_2 = Zone("nl-ams-2") 7 | ZONE_NL_AMS_3 = Zone("nl-ams-3") 8 | ZONE_PL_WAW_1 = Zone("pl-waw-1") 9 | ZONE_PL_WAW_2 = Zone("pl-waw-2") 10 | 11 | ALL_ZONES = [ 12 | ZONE_FR_PAR_1, 13 | ZONE_FR_PAR_2, 14 | ZONE_FR_PAR_3, 15 | ZONE_NL_AMS_1, 16 | ZONE_NL_AMS_2, 17 | ZONE_NL_AMS_3, 18 | ZONE_PL_WAW_1, 19 | ZONE_PL_WAW_2, 20 | ] 21 | -------------------------------------------------------------------------------- /scaleway/scaleway/redis/v1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | ClusterStatus, 6 | ) 7 | 8 | CLUSTER_TRANSIENT_STATUSES: list[ClusterStatus] = [ 9 | ClusterStatus.PROVISIONING, 10 | ClusterStatus.CONFIGURING, 11 | ClusterStatus.DELETING, 12 | ClusterStatus.AUTOHEALING, 13 | ClusterStatus.INITIALIZING, 14 | ] 15 | """ 16 | Lists transient statutes of the enum :class:`ClusterStatus `. 17 | """ 18 | -------------------------------------------------------------------------------- /docs/pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.poetry] 2 | name = "scaleway-docs" 3 | version = "2.0.0" 4 | description = "" 5 | authors = ["Scaleway "] 6 | license = "BSD" 7 | 8 | [tool.poetry.dependencies] 9 | python = "^3.8" 10 | sphinx-rtd-theme = "^3.0.2" 11 | Sphinx = "^7" 12 | scaleway-core = { path = "../scaleway-core", develop = true } 13 | scaleway = { path = "../scaleway", develop = true } 14 | scaleway-async = { path = "../scaleway-async", develop = true } 15 | 16 | [build-system] 17 | requires = ["poetry-core"] 18 | build-backend = "poetry.core.masonry.api" 19 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/redis/v1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | ClusterStatus, 6 | ) 7 | 8 | CLUSTER_TRANSIENT_STATUSES: list[ClusterStatus] = [ 9 | ClusterStatus.PROVISIONING, 10 | ClusterStatus.CONFIGURING, 11 | ClusterStatus.DELETING, 12 | ClusterStatus.AUTOHEALING, 13 | ClusterStatus.INITIALIZING, 14 | ] 15 | """ 16 | Lists transient statutes of the enum :class:`ClusterStatus `. 17 | """ 18 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Reporting a Vulnerability 4 | 5 | At Scaleway we take security seriously. If you have any issue regarding security, 6 | please notify us by sending an email to security@scaleway.com. 7 | 8 | Please DO NOT create a GitHub issue. 9 | 10 | We will follow up with you promptly with more information and a plan for remediation. 11 | We currently do not offer a paid security bounty program, but we would love to send some 12 | Scaleway swag your way along with our deepest gratitude for your assistance in making 13 | Scaleway a more secure Cloud ecosystem. 14 | -------------------------------------------------------------------------------- /scaleway-core/scaleway_core/utils/strenummeta.py: -------------------------------------------------------------------------------- 1 | from enum import EnumMeta 2 | from typing import Any 3 | 4 | 5 | class StrEnumMeta(EnumMeta): 6 | def __call__(cls, value: str, *args: Any, **kwargs: Any) -> Any: 7 | names = kwargs.pop("names", None) 8 | 9 | if names is not None: 10 | return super().__call__(value, names, *args, **kwargs) 11 | 12 | try: 13 | return super().__call__(value, *args, **kwargs) 14 | except ValueError: 15 | if isinstance(value, str): 16 | return value 17 | raise 18 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: pip 4 | directory: /scaleway 5 | schedule: 6 | interval: monthly 7 | 8 | - package-ecosystem: pip 9 | directory: /scaleway-async 10 | schedule: 11 | interval: monthly 12 | 13 | - package-ecosystem: pip 14 | directory: /scaleway-core 15 | schedule: 16 | interval: monthly 17 | 18 | - package-ecosystem: github-actions 19 | directory: / 20 | schedule: 21 | interval: monthly 22 | 23 | - package-ecosystem: pip 24 | directory: /docs 25 | schedule: 26 | interval: monthly 27 | -------------------------------------------------------------------------------- /scaleway-core/scaleway_core/utils/validate_path_param.py: -------------------------------------------------------------------------------- 1 | from datetime import datetime 2 | from typing import Optional, Union 3 | 4 | 5 | def validate_path_param(name: str, value: Optional[Union[str, int, datetime]]) -> str: 6 | """ 7 | Returns the parameter if it's valid as path parameter 8 | (string and not empty, or number), else throws an exception. 9 | """ 10 | if type(value) is datetime: 11 | value = value.isoformat() 12 | 13 | if (value is None) or (isinstance(value, str) and not value): 14 | raise ValueError(f"Path parameter {name} is required") 15 | 16 | return str(value) 17 | -------------------------------------------------------------------------------- /scaleway/scaleway/datawarehouse/v1beta1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | DeploymentStatus, 6 | ) 7 | 8 | DEPLOYMENT_TRANSIENT_STATUSES: list[DeploymentStatus] = [ 9 | DeploymentStatus.CREATING, 10 | DeploymentStatus.CONFIGURING, 11 | DeploymentStatus.DELETING, 12 | DeploymentStatus.LOCKING, 13 | DeploymentStatus.UNLOCKING, 14 | DeploymentStatus.DEPLOYING, 15 | ] 16 | """ 17 | Lists transient statutes of the enum :class:`DeploymentStatus `. 18 | """ 19 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/datawarehouse/v1beta1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | DeploymentStatus, 6 | ) 7 | 8 | DEPLOYMENT_TRANSIENT_STATUSES: list[DeploymentStatus] = [ 9 | DeploymentStatus.CREATING, 10 | DeploymentStatus.CONFIGURING, 11 | DeploymentStatus.DELETING, 12 | DeploymentStatus.LOCKING, 13 | DeploymentStatus.UNLOCKING, 14 | DeploymentStatus.DEPLOYING, 15 | ] 16 | """ 17 | Lists transient statutes of the enum :class:`DeploymentStatus `. 18 | """ 19 | -------------------------------------------------------------------------------- /scaleway/scaleway/edge_services/v1beta1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | PipelineStatus, 6 | PurgeRequestStatus, 7 | ) 8 | 9 | PIPELINE_TRANSIENT_STATUSES: list[PipelineStatus] = [ 10 | PipelineStatus.PENDING, 11 | ] 12 | """ 13 | Lists transient statutes of the enum :class:`PipelineStatus `. 14 | """ 15 | PURGE_REQUEST_TRANSIENT_STATUSES: list[PurgeRequestStatus] = [ 16 | PurgeRequestStatus.PENDING, 17 | ] 18 | """ 19 | Lists transient statutes of the enum :class:`PurgeRequestStatus `. 20 | """ 21 | -------------------------------------------------------------------------------- /scaleway/scaleway/ipfs/v1alpha1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | from typing import List 4 | 5 | from .types import ( 6 | NameStatus, 7 | PinStatus, 8 | ) 9 | 10 | NAME_TRANSIENT_STATUSES: List[NameStatus] = [ 11 | NameStatus.QUEUED, 12 | NameStatus.PUBLISHING, 13 | ] 14 | """ 15 | Lists transient statutes of the enum :class:`NameStatus `. 16 | """ 17 | PIN_TRANSIENT_STATUSES: List[PinStatus] = [ 18 | PinStatus.QUEUED, 19 | PinStatus.PINNING, 20 | ] 21 | """ 22 | Lists transient statutes of the enum :class:`PinStatus `. 23 | """ 24 | -------------------------------------------------------------------------------- /scaleway/scaleway/tem/v1alpha1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | DomainStatus, 6 | EmailStatus, 7 | ) 8 | 9 | DOMAIN_TRANSIENT_STATUSES: list[DomainStatus] = [ 10 | DomainStatus.PENDING, 11 | DomainStatus.AUTOCONFIGURING, 12 | ] 13 | """ 14 | Lists transient statutes of the enum :class:`DomainStatus `. 15 | """ 16 | EMAIL_TRANSIENT_STATUSES: list[EmailStatus] = [ 17 | EmailStatus.NEW, 18 | EmailStatus.SENDING, 19 | ] 20 | """ 21 | Lists transient statutes of the enum :class:`EmailStatus `. 22 | """ 23 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/edge_services/v1beta1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | PipelineStatus, 6 | PurgeRequestStatus, 7 | ) 8 | 9 | PIPELINE_TRANSIENT_STATUSES: list[PipelineStatus] = [ 10 | PipelineStatus.PENDING, 11 | ] 12 | """ 13 | Lists transient statutes of the enum :class:`PipelineStatus `. 14 | """ 15 | PURGE_REQUEST_TRANSIENT_STATUSES: list[PurgeRequestStatus] = [ 16 | PurgeRequestStatus.PENDING, 17 | ] 18 | """ 19 | Lists transient statutes of the enum :class:`PurgeRequestStatus `. 20 | """ 21 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/ipfs/v1alpha1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | from typing import List 4 | 5 | from .types import ( 6 | NameStatus, 7 | PinStatus, 8 | ) 9 | 10 | NAME_TRANSIENT_STATUSES: List[NameStatus] = [ 11 | NameStatus.QUEUED, 12 | NameStatus.PUBLISHING, 13 | ] 14 | """ 15 | Lists transient statutes of the enum :class:`NameStatus `. 16 | """ 17 | PIN_TRANSIENT_STATUSES: List[PinStatus] = [ 18 | PinStatus.QUEUED, 19 | PinStatus.PINNING, 20 | ] 21 | """ 22 | Lists transient statutes of the enum :class:`PinStatus `. 23 | """ 24 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/tem/v1alpha1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | DomainStatus, 6 | EmailStatus, 7 | ) 8 | 9 | DOMAIN_TRANSIENT_STATUSES: list[DomainStatus] = [ 10 | DomainStatus.PENDING, 11 | DomainStatus.AUTOCONFIGURING, 12 | ] 13 | """ 14 | Lists transient statutes of the enum :class:`DomainStatus `. 15 | """ 16 | EMAIL_TRANSIENT_STATUSES: list[EmailStatus] = [ 17 | EmailStatus.NEW, 18 | EmailStatus.SENDING, 19 | ] 20 | """ 21 | Lists transient statutes of the enum :class:`EmailStatus `. 22 | """ 23 | -------------------------------------------------------------------------------- /scaleway/scaleway/interlink/v1beta1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | DedicatedConnectionStatus, 6 | LinkStatus, 7 | ) 8 | 9 | DEDICATED_CONNECTION_TRANSIENT_STATUSES: list[DedicatedConnectionStatus] = [ 10 | DedicatedConnectionStatus.CONFIGURING, 11 | ] 12 | """ 13 | Lists transient statutes of the enum :class:`DedicatedConnectionStatus `. 14 | """ 15 | LINK_TRANSIENT_STATUSES: list[LinkStatus] = [ 16 | LinkStatus.CONFIGURING, 17 | ] 18 | """ 19 | Lists transient statutes of the enum :class:`LinkStatus `. 20 | """ 21 | -------------------------------------------------------------------------------- /scaleway/scaleway/edge_services/v1alpha1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | from typing import List 4 | 5 | from .types import ( 6 | PipelineStatus, 7 | PurgeRequestStatus, 8 | ) 9 | 10 | PIPELINE_TRANSIENT_STATUSES: List[PipelineStatus] = [ 11 | PipelineStatus.PENDING, 12 | ] 13 | """ 14 | Lists transient statutes of the enum :class:`PipelineStatus `. 15 | """ 16 | PURGE_REQUEST_TRANSIENT_STATUSES: List[PurgeRequestStatus] = [ 17 | PurgeRequestStatus.PENDING, 18 | ] 19 | """ 20 | Lists transient statutes of the enum :class:`PurgeRequestStatus `. 21 | """ 22 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/interlink/v1beta1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | DedicatedConnectionStatus, 6 | LinkStatus, 7 | ) 8 | 9 | DEDICATED_CONNECTION_TRANSIENT_STATUSES: list[DedicatedConnectionStatus] = [ 10 | DedicatedConnectionStatus.CONFIGURING, 11 | ] 12 | """ 13 | Lists transient statutes of the enum :class:`DedicatedConnectionStatus `. 14 | """ 15 | LINK_TRANSIENT_STATUSES: list[LinkStatus] = [ 16 | LinkStatus.CONFIGURING, 17 | ] 18 | """ 19 | Lists transient statutes of the enum :class:`LinkStatus `. 20 | """ 21 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/edge_services/v1alpha1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | from typing import List 4 | 5 | from .types import ( 6 | PipelineStatus, 7 | PurgeRequestStatus, 8 | ) 9 | 10 | PIPELINE_TRANSIENT_STATUSES: List[PipelineStatus] = [ 11 | PipelineStatus.PENDING, 12 | ] 13 | """ 14 | Lists transient statutes of the enum :class:`PipelineStatus `. 15 | """ 16 | PURGE_REQUEST_TRANSIENT_STATUSES: List[PurgeRequestStatus] = [ 17 | PurgeRequestStatus.PENDING, 18 | ] 19 | """ 20 | Lists transient statutes of the enum :class:`PurgeRequestStatus `. 21 | """ 22 | -------------------------------------------------------------------------------- /scaleway-core/scaleway_core/utils/project_or_organization_id.py: -------------------------------------------------------------------------------- 1 | from typing import Dict, Optional 2 | 3 | 4 | def project_or_organization_id( 5 | organization_id: Optional[str], 6 | project_id: Optional[str], 7 | default_project_id: Optional[str], 8 | ) -> Dict[str, str]: 9 | if project_id is not None: 10 | return { 11 | "project_id": project_id, 12 | } 13 | 14 | if organization_id is not None: 15 | return { 16 | "organization_id": organization_id, 17 | } 18 | 19 | if default_project_id is not None: 20 | return { 21 | "project_id": default_project_id, 22 | } 23 | 24 | raise ValueError("You must provide either a project_id or an organization_id") 25 | -------------------------------------------------------------------------------- /scaleway/scaleway/flexibleip/v1alpha1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | FlexibleIPStatus, 6 | MACAddressStatus, 7 | ) 8 | 9 | FLEXIBLE_IP_TRANSIENT_STATUSES: list[FlexibleIPStatus] = [ 10 | FlexibleIPStatus.UPDATING, 11 | FlexibleIPStatus.DETACHING, 12 | ] 13 | """ 14 | Lists transient statutes of the enum :class:`FlexibleIPStatus `. 15 | """ 16 | MAC_ADDRESS_TRANSIENT_STATUSES: list[MACAddressStatus] = [ 17 | MACAddressStatus.UPDATING, 18 | MACAddressStatus.DELETING, 19 | ] 20 | """ 21 | Lists transient statutes of the enum :class:`MACAddressStatus `. 22 | """ 23 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/flexibleip/v1alpha1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | FlexibleIPStatus, 6 | MACAddressStatus, 7 | ) 8 | 9 | FLEXIBLE_IP_TRANSIENT_STATUSES: list[FlexibleIPStatus] = [ 10 | FlexibleIPStatus.UPDATING, 11 | FlexibleIPStatus.DETACHING, 12 | ] 13 | """ 14 | Lists transient statutes of the enum :class:`FlexibleIPStatus `. 15 | """ 16 | MAC_ADDRESS_TRANSIENT_STATUSES: list[MACAddressStatus] = [ 17 | MACAddressStatus.UPDATING, 18 | MACAddressStatus.DELETING, 19 | ] 20 | """ 21 | Lists transient statutes of the enum :class:`MACAddressStatus `. 22 | """ 23 | -------------------------------------------------------------------------------- /scaleway/scaleway/inference/v1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | DeploymentStatus, 6 | ModelStatus, 7 | ) 8 | 9 | DEPLOYMENT_TRANSIENT_STATUSES: list[DeploymentStatus] = [ 10 | DeploymentStatus.CREATING, 11 | DeploymentStatus.DEPLOYING, 12 | DeploymentStatus.DELETING, 13 | DeploymentStatus.SCALING, 14 | ] 15 | """ 16 | Lists transient statutes of the enum :class:`DeploymentStatus `. 17 | """ 18 | MODEL_TRANSIENT_STATUSES: list[ModelStatus] = [ 19 | ModelStatus.PREPARING, 20 | ModelStatus.DOWNLOADING, 21 | ] 22 | """ 23 | Lists transient statutes of the enum :class:`ModelStatus `. 24 | """ 25 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/inference/v1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | DeploymentStatus, 6 | ModelStatus, 7 | ) 8 | 9 | DEPLOYMENT_TRANSIENT_STATUSES: list[DeploymentStatus] = [ 10 | DeploymentStatus.CREATING, 11 | DeploymentStatus.DEPLOYING, 12 | DeploymentStatus.DELETING, 13 | DeploymentStatus.SCALING, 14 | ] 15 | """ 16 | Lists transient statutes of the enum :class:`DeploymentStatus `. 17 | """ 18 | MODEL_TRANSIENT_STATUSES: list[ModelStatus] = [ 19 | ModelStatus.PREPARING, 20 | ModelStatus.DOWNLOADING, 21 | ] 22 | """ 23 | Lists transient statutes of the enum :class:`ModelStatus `. 24 | """ 25 | -------------------------------------------------------------------------------- /scaleway-core/scaleway_core/profile/__init__.py: -------------------------------------------------------------------------------- 1 | from .env import ( 2 | ENV_KEY_SCW_ACCESS_KEY, 3 | ENV_KEY_SCW_API_URL, 4 | ENV_KEY_SCW_CONFIG_PATH, 5 | ENV_KEY_SCW_DEFAULT_ORGANIZATION_ID, 6 | ENV_KEY_SCW_DEFAULT_PROJECT_ID, 7 | ENV_KEY_SCW_DEFAULT_REGION, 8 | ENV_KEY_SCW_DEFAULT_ZONE, 9 | ENV_KEY_SCW_SECRET_KEY, 10 | ) 11 | from .profile import Profile, ProfileConfig, ProfileDefaults 12 | 13 | __all__ = [ 14 | "ENV_KEY_SCW_ACCESS_KEY", 15 | "ENV_KEY_SCW_API_URL", 16 | "ENV_KEY_SCW_CONFIG_PATH", 17 | "ENV_KEY_SCW_DEFAULT_ORGANIZATION_ID", 18 | "ENV_KEY_SCW_DEFAULT_PROJECT_ID", 19 | "ENV_KEY_SCW_DEFAULT_REGION", 20 | "ENV_KEY_SCW_DEFAULT_ZONE", 21 | "ENV_KEY_SCW_SECRET_KEY", 22 | "Profile", 23 | "ProfileConfig", 24 | "ProfileDefaults", 25 | ] 26 | -------------------------------------------------------------------------------- /scaleway/scaleway/registry/v1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | ImageStatus, 6 | NamespaceStatus, 7 | TagStatus, 8 | ) 9 | 10 | IMAGE_TRANSIENT_STATUSES: list[ImageStatus] = [ 11 | ImageStatus.DELETING, 12 | ] 13 | """ 14 | Lists transient statutes of the enum :class:`ImageStatus `. 15 | """ 16 | NAMESPACE_TRANSIENT_STATUSES: list[NamespaceStatus] = [ 17 | NamespaceStatus.DELETING, 18 | ] 19 | """ 20 | Lists transient statutes of the enum :class:`NamespaceStatus `. 21 | """ 22 | TAG_TRANSIENT_STATUSES: list[TagStatus] = [ 23 | TagStatus.DELETING, 24 | ] 25 | """ 26 | Lists transient statutes of the enum :class:`TagStatus `. 27 | """ 28 | -------------------------------------------------------------------------------- /scaleway/scaleway/account/v2/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | from .types import ListProjectsRequestOrderBy 4 | from .types import Project 5 | from .types import CreateProjectRequest 6 | from .types import DeleteProjectRequest 7 | from .types import GetProjectRequest 8 | from .types import ListProjectsRequest 9 | from .types import ListProjectsResponse 10 | from .types import UpdateProjectRequest 11 | from .api import AccountV2API 12 | 13 | __all__ = [ 14 | "ListProjectsRequestOrderBy", 15 | "Project", 16 | "CreateProjectRequest", 17 | "DeleteProjectRequest", 18 | "GetProjectRequest", 19 | "ListProjectsRequest", 20 | "ListProjectsResponse", 21 | "UpdateProjectRequest", 22 | "AccountV2API", 23 | ] 24 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/registry/v1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | ImageStatus, 6 | NamespaceStatus, 7 | TagStatus, 8 | ) 9 | 10 | IMAGE_TRANSIENT_STATUSES: list[ImageStatus] = [ 11 | ImageStatus.DELETING, 12 | ] 13 | """ 14 | Lists transient statutes of the enum :class:`ImageStatus `. 15 | """ 16 | NAMESPACE_TRANSIENT_STATUSES: list[NamespaceStatus] = [ 17 | NamespaceStatus.DELETING, 18 | ] 19 | """ 20 | Lists transient statutes of the enum :class:`NamespaceStatus `. 21 | """ 22 | TAG_TRANSIENT_STATUSES: list[TagStatus] = [ 23 | TagStatus.DELETING, 24 | ] 25 | """ 26 | Lists transient statutes of the enum :class:`TagStatus `. 27 | """ 28 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/account/v2/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | from .types import ListProjectsRequestOrderBy 4 | from .types import Project 5 | from .types import CreateProjectRequest 6 | from .types import DeleteProjectRequest 7 | from .types import GetProjectRequest 8 | from .types import ListProjectsRequest 9 | from .types import ListProjectsResponse 10 | from .types import UpdateProjectRequest 11 | from .api import AccountV2API 12 | 13 | __all__ = [ 14 | "ListProjectsRequestOrderBy", 15 | "Project", 16 | "CreateProjectRequest", 17 | "DeleteProjectRequest", 18 | "GetProjectRequest", 19 | "ListProjectsRequest", 20 | "ListProjectsResponse", 21 | "UpdateProjectRequest", 22 | "AccountV2API", 23 | ] 24 | -------------------------------------------------------------------------------- /scaleway/scaleway/mongodb/v1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | InstanceStatus, 6 | SnapshotStatus, 7 | ) 8 | 9 | INSTANCE_TRANSIENT_STATUSES: list[InstanceStatus] = [ 10 | InstanceStatus.PROVISIONING, 11 | InstanceStatus.CONFIGURING, 12 | InstanceStatus.DELETING, 13 | InstanceStatus.INITIALIZING, 14 | InstanceStatus.SNAPSHOTTING, 15 | ] 16 | """ 17 | Lists transient statutes of the enum :class:`InstanceStatus `. 18 | """ 19 | SNAPSHOT_TRANSIENT_STATUSES: list[SnapshotStatus] = [ 20 | SnapshotStatus.CREATING, 21 | SnapshotStatus.RESTORING, 22 | SnapshotStatus.DELETING, 23 | ] 24 | """ 25 | Lists transient statutes of the enum :class:`SnapshotStatus `. 26 | """ 27 | -------------------------------------------------------------------------------- /scaleway/scaleway/vpcgw/v1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | GatewayNetworkStatus, 6 | GatewayStatus, 7 | ) 8 | 9 | GATEWAY_NETWORK_TRANSIENT_STATUSES: list[GatewayNetworkStatus] = [ 10 | GatewayNetworkStatus.ATTACHING, 11 | GatewayNetworkStatus.CONFIGURING, 12 | GatewayNetworkStatus.DETACHING, 13 | ] 14 | """ 15 | Lists transient statutes of the enum :class:`GatewayNetworkStatus `. 16 | """ 17 | GATEWAY_TRANSIENT_STATUSES: list[GatewayStatus] = [ 18 | GatewayStatus.ALLOCATING, 19 | GatewayStatus.CONFIGURING, 20 | GatewayStatus.STOPPING, 21 | GatewayStatus.DELETING, 22 | ] 23 | """ 24 | Lists transient statutes of the enum :class:`GatewayStatus `. 25 | """ 26 | -------------------------------------------------------------------------------- /scaleway/scaleway/vpcgw/v2/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | GatewayNetworkStatus, 6 | GatewayStatus, 7 | ) 8 | 9 | GATEWAY_NETWORK_TRANSIENT_STATUSES: list[GatewayNetworkStatus] = [ 10 | GatewayNetworkStatus.ATTACHING, 11 | GatewayNetworkStatus.CONFIGURING, 12 | GatewayNetworkStatus.DETACHING, 13 | ] 14 | """ 15 | Lists transient statutes of the enum :class:`GatewayNetworkStatus `. 16 | """ 17 | GATEWAY_TRANSIENT_STATUSES: list[GatewayStatus] = [ 18 | GatewayStatus.ALLOCATING, 19 | GatewayStatus.CONFIGURING, 20 | GatewayStatus.STOPPING, 21 | GatewayStatus.DELETING, 22 | ] 23 | """ 24 | Lists transient statutes of the enum :class:`GatewayStatus `. 25 | """ 26 | -------------------------------------------------------------------------------- /scaleway/scaleway/mongodb/v1alpha1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | InstanceStatus, 6 | SnapshotStatus, 7 | ) 8 | 9 | INSTANCE_TRANSIENT_STATUSES: list[InstanceStatus] = [ 10 | InstanceStatus.PROVISIONING, 11 | InstanceStatus.CONFIGURING, 12 | InstanceStatus.DELETING, 13 | InstanceStatus.INITIALIZING, 14 | InstanceStatus.SNAPSHOTTING, 15 | ] 16 | """ 17 | Lists transient statutes of the enum :class:`InstanceStatus `. 18 | """ 19 | SNAPSHOT_TRANSIENT_STATUSES: list[SnapshotStatus] = [ 20 | SnapshotStatus.CREATING, 21 | SnapshotStatus.RESTORING, 22 | SnapshotStatus.DELETING, 23 | ] 24 | """ 25 | Lists transient statutes of the enum :class:`SnapshotStatus `. 26 | """ 27 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line, and also 5 | # from the environment for the first two. 6 | SPHINXOPTS ?= -j auto 7 | SPHINXBUILD ?= sphinx-build 8 | SOURCEDIR = . 9 | BUILDDIR = _build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | sphinx-apidoc -f -o ./source ../scaleway-core 21 | sphinx-apidoc -f -o ./source ../scaleway 22 | sphinx-apidoc -f -o ./source ../scaleway-async 23 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 24 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/mongodb/v1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | InstanceStatus, 6 | SnapshotStatus, 7 | ) 8 | 9 | INSTANCE_TRANSIENT_STATUSES: list[InstanceStatus] = [ 10 | InstanceStatus.PROVISIONING, 11 | InstanceStatus.CONFIGURING, 12 | InstanceStatus.DELETING, 13 | InstanceStatus.INITIALIZING, 14 | InstanceStatus.SNAPSHOTTING, 15 | ] 16 | """ 17 | Lists transient statutes of the enum :class:`InstanceStatus `. 18 | """ 19 | SNAPSHOT_TRANSIENT_STATUSES: list[SnapshotStatus] = [ 20 | SnapshotStatus.CREATING, 21 | SnapshotStatus.RESTORING, 22 | SnapshotStatus.DELETING, 23 | ] 24 | """ 25 | Lists transient statutes of the enum :class:`SnapshotStatus `. 26 | """ 27 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/vpcgw/v1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | GatewayNetworkStatus, 6 | GatewayStatus, 7 | ) 8 | 9 | GATEWAY_NETWORK_TRANSIENT_STATUSES: list[GatewayNetworkStatus] = [ 10 | GatewayNetworkStatus.ATTACHING, 11 | GatewayNetworkStatus.CONFIGURING, 12 | GatewayNetworkStatus.DETACHING, 13 | ] 14 | """ 15 | Lists transient statutes of the enum :class:`GatewayNetworkStatus `. 16 | """ 17 | GATEWAY_TRANSIENT_STATUSES: list[GatewayStatus] = [ 18 | GatewayStatus.ALLOCATING, 19 | GatewayStatus.CONFIGURING, 20 | GatewayStatus.STOPPING, 21 | GatewayStatus.DELETING, 22 | ] 23 | """ 24 | Lists transient statutes of the enum :class:`GatewayStatus `. 25 | """ 26 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/vpcgw/v2/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | GatewayNetworkStatus, 6 | GatewayStatus, 7 | ) 8 | 9 | GATEWAY_NETWORK_TRANSIENT_STATUSES: list[GatewayNetworkStatus] = [ 10 | GatewayNetworkStatus.ATTACHING, 11 | GatewayNetworkStatus.CONFIGURING, 12 | GatewayNetworkStatus.DETACHING, 13 | ] 14 | """ 15 | Lists transient statutes of the enum :class:`GatewayNetworkStatus `. 16 | """ 17 | GATEWAY_TRANSIENT_STATUSES: list[GatewayStatus] = [ 18 | GatewayStatus.ALLOCATING, 19 | GatewayStatus.CONFIGURING, 20 | GatewayStatus.STOPPING, 21 | GatewayStatus.DELETING, 22 | ] 23 | """ 24 | Lists transient statutes of the enum :class:`GatewayStatus `. 25 | """ 26 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/mongodb/v1alpha1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | InstanceStatus, 6 | SnapshotStatus, 7 | ) 8 | 9 | INSTANCE_TRANSIENT_STATUSES: list[InstanceStatus] = [ 10 | InstanceStatus.PROVISIONING, 11 | InstanceStatus.CONFIGURING, 12 | InstanceStatus.DELETING, 13 | InstanceStatus.INITIALIZING, 14 | InstanceStatus.SNAPSHOTTING, 15 | ] 16 | """ 17 | Lists transient statutes of the enum :class:`InstanceStatus `. 18 | """ 19 | SNAPSHOT_TRANSIENT_STATUSES: list[SnapshotStatus] = [ 20 | SnapshotStatus.CREATING, 21 | SnapshotStatus.RESTORING, 22 | SnapshotStatus.DELETING, 23 | ] 24 | """ 25 | Lists transient statutes of the enum :class:`SnapshotStatus `. 26 | """ 27 | -------------------------------------------------------------------------------- /scaleway-core/scaleway_core/profile/env.py: -------------------------------------------------------------------------------- 1 | ENV_KEY_SCW_CONFIG_PATH = "SCW_CONFIG_PATH" 2 | ENV_KEY_SCW_PROFILE = "SCW_PROFILE" 3 | ENV_KEY_SCW_ACCESS_KEY = "SCW_ACCESS_KEY" 4 | ENV_KEY_SCW_SECRET_KEY = "SCW_SECRET_KEY" # nosec B105 5 | ENV_KEY_SCW_API_URL = "SCW_API_URL" 6 | ENV_KEY_SCW_DEFAULT_ORGANIZATION_ID = "SCW_DEFAULT_ORGANIZATION_ID" 7 | ENV_KEY_SCW_DEFAULT_PROJECT_ID = "SCW_DEFAULT_PROJECT_ID" 8 | ENV_KEY_SCW_DEFAULT_REGION = "SCW_DEFAULT_REGION" 9 | ENV_KEY_SCW_DEFAULT_ZONE = "SCW_DEFAULT_ZONE" 10 | 11 | ENV_VARIABLES_TO_PROFILE = { 12 | ENV_KEY_SCW_ACCESS_KEY: "access_key", 13 | ENV_KEY_SCW_SECRET_KEY: "secret_key", 14 | ENV_KEY_SCW_API_URL: "api_url", 15 | ENV_KEY_SCW_DEFAULT_ORGANIZATION_ID: "default_organization_id", 16 | ENV_KEY_SCW_DEFAULT_PROJECT_ID: "default_project_id", 17 | ENV_KEY_SCW_DEFAULT_REGION: "default_region", 18 | ENV_KEY_SCW_DEFAULT_ZONE: "default_zone", 19 | } 20 | -------------------------------------------------------------------------------- /.github/workflows/format.yml: -------------------------------------------------------------------------------- 1 | name: Check formatting 2 | permissions: 3 | contents: read 4 | 5 | on: 6 | push: 7 | branches: 8 | - main 9 | pull_request: 10 | merge_group: 11 | 12 | jobs: 13 | ruff: 14 | runs-on: ubuntu-latest 15 | strategy: 16 | matrix: 17 | lib: 18 | - scaleway-core 19 | - scaleway 20 | - scaleway-async 21 | defaults: 22 | run: 23 | working-directory: ${{ matrix.lib }} 24 | steps: 25 | - uses: actions/checkout@v6 26 | - name: Install poetry 27 | run: pipx install poetry 28 | - name: Set up Python 29 | uses: actions/setup-python@v6 30 | with: 31 | python-version: '3.13' 32 | cache: "poetry" 33 | - name: Install dependencies and library 34 | run: poetry install 35 | - name: Check format 36 | run: poetry run ruff format --check 37 | -------------------------------------------------------------------------------- /scaleway/scaleway/vpc/v1/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | from .types import ListPrivateNetworksRequestOrderBy 4 | from .types import PrivateNetwork 5 | from .types import CreatePrivateNetworkRequest 6 | from .types import DeletePrivateNetworkRequest 7 | from .types import GetPrivateNetworkRequest 8 | from .types import ListPrivateNetworksRequest 9 | from .types import ListPrivateNetworksResponse 10 | from .types import UpdatePrivateNetworkRequest 11 | from .api import VpcV1API 12 | 13 | __all__ = [ 14 | "ListPrivateNetworksRequestOrderBy", 15 | "PrivateNetwork", 16 | "CreatePrivateNetworkRequest", 17 | "DeletePrivateNetworkRequest", 18 | "GetPrivateNetworkRequest", 19 | "ListPrivateNetworksRequest", 20 | "ListPrivateNetworksResponse", 21 | "UpdatePrivateNetworkRequest", 22 | "VpcV1API", 23 | ] 24 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/vpc/v1/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | from .types import ListPrivateNetworksRequestOrderBy 4 | from .types import PrivateNetwork 5 | from .types import CreatePrivateNetworkRequest 6 | from .types import DeletePrivateNetworkRequest 7 | from .types import GetPrivateNetworkRequest 8 | from .types import ListPrivateNetworksRequest 9 | from .types import ListPrivateNetworksResponse 10 | from .types import UpdatePrivateNetworkRequest 11 | from .api import VpcV1API 12 | 13 | __all__ = [ 14 | "ListPrivateNetworksRequestOrderBy", 15 | "PrivateNetwork", 16 | "CreatePrivateNetworkRequest", 17 | "DeletePrivateNetworkRequest", 18 | "GetPrivateNetworkRequest", 19 | "ListPrivateNetworksRequest", 20 | "ListPrivateNetworksResponse", 21 | "UpdatePrivateNetworkRequest", 22 | "VpcV1API", 23 | ] 24 | -------------------------------------------------------------------------------- /docs/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=sphinx-build 9 | ) 10 | set SOURCEDIR=. 11 | set BUILDDIR=_build 12 | 13 | %SPHINXBUILD% >NUL 2>NUL 14 | if errorlevel 9009 ( 15 | echo. 16 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 17 | echo.installed, then set the SPHINXBUILD environment variable to point 18 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 19 | echo.may add the Sphinx directory to PATH. 20 | echo. 21 | echo.If you don't have Sphinx installed, grab it from 22 | echo.https://www.sphinx-doc.org/ 23 | exit /b 1 24 | ) 25 | 26 | if "%1" == "" goto help 27 | 28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 29 | goto end 30 | 31 | :help 32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 33 | 34 | :end 35 | popd 36 | -------------------------------------------------------------------------------- /scaleway-core/scaleway_core/utils/__init__.py: -------------------------------------------------------------------------------- 1 | from .fetch_all_pages import ( 2 | fetch_all_pages, 3 | fetch_all_pages_async, 4 | ) 5 | 6 | from .project_or_organization_id import project_or_organization_id 7 | 8 | from .random_name import random_name 9 | 10 | from .resolve_one_of import OneOfPossibility, resolve_one_of 11 | 12 | from .strenummeta import StrEnumMeta 13 | 14 | from .validate_path_param import validate_path_param 15 | 16 | from .waiter import ( 17 | WaitForOptions, 18 | WaitForStopCondition, 19 | wait_for_resource, 20 | wait_for_resource_async, 21 | ) 22 | 23 | __all__ = [ 24 | "OneOfPossibility", 25 | "StrEnumMeta", 26 | "WaitForOptions", 27 | "WaitForStopCondition", 28 | "fetch_all_pages", 29 | "fetch_all_pages_async", 30 | "project_or_organization_id", 31 | "random_name", 32 | "resolve_one_of", 33 | "validate_path_param", 34 | "wait_for_resource", 35 | "wait_for_resource_async", 36 | ] 37 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ### Community Note 2 | 3 | * Please vote on this pull request by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original pull request comment to help the community and maintainers prioritize this request. 4 | * Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request 5 | 6 | 7 | 8 | 9 | Relates OR Closes #0000 10 | 11 | Release note for [CHANGELOG](https://github.com/scaleway/scaleway-sdk-python/blob/master/CHANGELOG.md): 12 | 15 | 16 | ```release-note 17 | 18 | ``` 19 | -------------------------------------------------------------------------------- /scaleway-core/scaleway_core/bridge/decimal.py: -------------------------------------------------------------------------------- 1 | from decimal import Decimal 2 | from typing import Any, Dict 3 | 4 | from scaleway_core.profile import ProfileDefaults 5 | 6 | 7 | def unmarshal_Decimal(data: Any) -> Decimal: 8 | """ 9 | Unmarshal an instance of Decimal from the given data. 10 | """ 11 | if not isinstance(data, dict): 12 | raise TypeError( 13 | "Unmarshalling the type 'Decimal' failed as data isn't a dictionary." 14 | ) 15 | 16 | if "value" not in data: 17 | raise TypeError( 18 | "Unmarshalling the type 'Decimal' failed as data does not contain a 'value' key." 19 | ) 20 | 21 | return Decimal(data["value"]) 22 | 23 | 24 | def marshal_Decimal(data: Decimal, _defaults: ProfileDefaults | None) -> Dict[str, Any]: 25 | """ 26 | Marshal an instance of Decimal into google.protobuf.Decimal JSON representation. 27 | """ 28 | return { 29 | "value": str(data), 30 | } 31 | -------------------------------------------------------------------------------- /scaleway/scaleway/instance/v1/custom_types.py: -------------------------------------------------------------------------------- 1 | from dataclasses import dataclass 2 | from typing import Optional, Dict 3 | 4 | from scaleway_core.bridge import Zone as ScwZone 5 | 6 | 7 | @dataclass 8 | class GetServerUserDataRequest: 9 | server_id: str 10 | 11 | """ 12 | Key defines the user data key to get 13 | """ 14 | key: str 15 | 16 | """ 17 | Zone of the user data to get 18 | """ 19 | zone: Optional[ScwZone] 20 | 21 | 22 | @dataclass 23 | class GetAllServerUserDataRequest: 24 | server_id: str 25 | 26 | """ 27 | Zone of the user data to get 28 | """ 29 | zone: Optional[ScwZone] 30 | 31 | 32 | @dataclass 33 | class GetAllServerUserDataResponse: 34 | user_data: Dict[str, bytes] 35 | 36 | 37 | @dataclass 38 | class SetAllServerUserDataRequest: 39 | server_id: str 40 | 41 | user_data: Dict[str, bytes] 42 | 43 | """ 44 | Zone of the user data to set 45 | """ 46 | zone: Optional[ScwZone] 47 | -------------------------------------------------------------------------------- /scaleway/scaleway/mongodb/v1/tests/README.md: -------------------------------------------------------------------------------- 1 | # MongoDB tests (VCR) 2 | 3 | This suite uses VCR cassettes to replay HTTP calls in CI. 4 | 5 | How to record locally: 6 | 7 | 1. Ensure you have valid Scaleway credentials exported (access key, secret key, default region). 8 | 2. Pick a MongoDB instance to target for snapshot creation. 9 | 3. Temporarily replace the fixed `instance_id` in `test_custom_api.py` with your instance id or set breakpoints to inject it. 10 | 4. Run the specific test once to record the cassette: 11 | 12 | ```bash 13 | pytest -k test_create_snapshot_with_naive_expires_at_vcr 14 | ``` 15 | 16 | 5. Commit the generated cassette file: 17 | - Path: `scaleway/scaleway/mongodb/v1/tests/cassettes/test_create_snapshot_with_naive_expires_at_vcr.cassette.yaml` 18 | 19 | Notes: 20 | - The test will skip in CI if the cassette file is missing. 21 | - After recording, restore the fixed `instance_id` value used by the test to keep requests stable across replays. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Scaleway Python SDK 2 | 3 | This SDK enables you to interact with Scaleway APIs using Python. 4 | 5 | > **Warning** 6 | > The project is in beta, but should be fairly stable. If you have issues using it, please [open an issue](https://github.com/scaleway/scaleway-sdk-python/issues/new). 7 | 8 | **🔗  Important links:** 9 | 10 | * [Reference documentation](https://scaleway.github.io/scaleway-sdk-python) 11 | * [Developers website](https://developers.scaleway.com) (API documentation) 12 | 13 | ## Get started 14 | 15 | Please refer to the [guide](https://scaleway.github.io/scaleway-sdk-python) to get started with the SDK. 16 | 17 | ## Development 18 | 19 | This repository is at its early stage and is still in active development. 20 | If you are looking for a way to contribute please read [CONTRIBUTING.md](./CONTRIBUTING.md). 21 | 22 | ## Reach us 23 | 24 | We love feedback. Feel free to reach us on [Scaleway Slack community](https://slack.scaleway.com/), we are waiting for you on [#opensource](https://scaleway-community.slack.com/app_redirect?channel=opensource). 25 | -------------------------------------------------------------------------------- /scaleway/scaleway/k8s/v1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | ClusterStatus, 6 | NodeStatus, 7 | PoolStatus, 8 | ) 9 | 10 | CLUSTER_TRANSIENT_STATUSES: list[ClusterStatus] = [ 11 | ClusterStatus.CREATING, 12 | ClusterStatus.DELETING, 13 | ClusterStatus.UPDATING, 14 | ] 15 | """ 16 | Lists transient statutes of the enum :class:`ClusterStatus `. 17 | """ 18 | NODE_TRANSIENT_STATUSES: list[NodeStatus] = [ 19 | NodeStatus.CREATING, 20 | NodeStatus.DELETING, 21 | NodeStatus.REBOOTING, 22 | NodeStatus.UPGRADING, 23 | NodeStatus.STARTING, 24 | NodeStatus.REGISTERING, 25 | ] 26 | """ 27 | Lists transient statutes of the enum :class:`NodeStatus `. 28 | """ 29 | POOL_TRANSIENT_STATUSES: list[PoolStatus] = [ 30 | PoolStatus.DELETING, 31 | PoolStatus.SCALING, 32 | PoolStatus.UPGRADING, 33 | ] 34 | """ 35 | Lists transient statutes of the enum :class:`PoolStatus `. 36 | """ 37 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/k8s/v1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | ClusterStatus, 6 | NodeStatus, 7 | PoolStatus, 8 | ) 9 | 10 | CLUSTER_TRANSIENT_STATUSES: list[ClusterStatus] = [ 11 | ClusterStatus.CREATING, 12 | ClusterStatus.DELETING, 13 | ClusterStatus.UPDATING, 14 | ] 15 | """ 16 | Lists transient statutes of the enum :class:`ClusterStatus `. 17 | """ 18 | NODE_TRANSIENT_STATUSES: list[NodeStatus] = [ 19 | NodeStatus.CREATING, 20 | NodeStatus.DELETING, 21 | NodeStatus.REBOOTING, 22 | NodeStatus.UPGRADING, 23 | NodeStatus.STARTING, 24 | NodeStatus.REGISTERING, 25 | ] 26 | """ 27 | Lists transient statutes of the enum :class:`NodeStatus `. 28 | """ 29 | POOL_TRANSIENT_STATUSES: list[PoolStatus] = [ 30 | PoolStatus.DELETING, 31 | PoolStatus.SCALING, 32 | PoolStatus.UPGRADING, 33 | ] 34 | """ 35 | Lists transient statutes of the enum :class:`PoolStatus `. 36 | """ 37 | -------------------------------------------------------------------------------- /scaleway/scaleway/instance/v1/custom_marshalling.py: -------------------------------------------------------------------------------- 1 | from typing import Dict, Any 2 | 3 | from scaleway.instance.v1.custom_types import ( 4 | GetServerUserDataRequest, 5 | GetAllServerUserDataRequest, 6 | ) 7 | from scaleway_core.profile import ProfileDefaults 8 | 9 | 10 | def marshal_GetServerUserDataRequest( 11 | request: GetServerUserDataRequest, defaults: ProfileDefaults 12 | ) -> Dict[str, Any]: 13 | output: Dict[str, Any] = {} 14 | 15 | if request.server_id is not None: 16 | output["server_id"] = request.server_id 17 | if request.key is not None: 18 | output["key"] = request.key 19 | if request.zone is not None: 20 | output["zone"] = request.zone 21 | 22 | return output 23 | 24 | 25 | def marshal_ListServerUserDataRequest( 26 | request: GetAllServerUserDataRequest, defaults: ProfileDefaults 27 | ) -> Dict[str, Any]: 28 | output: Dict[str, Any] = {} 29 | 30 | if request.server_id is not None: 31 | output["server_id"] = request.server_id 32 | if request.zone is not None: 33 | output["zone"] = request.zone 34 | 35 | return output 36 | -------------------------------------------------------------------------------- /scaleway/scaleway/block/v1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | ReferenceStatus, 6 | SnapshotStatus, 7 | VolumeStatus, 8 | ) 9 | 10 | REFERENCE_TRANSIENT_STATUSES: list[ReferenceStatus] = [ 11 | ReferenceStatus.ATTACHING, 12 | ReferenceStatus.DETACHING, 13 | ReferenceStatus.CREATING, 14 | ] 15 | """ 16 | Lists transient statutes of the enum :class:`ReferenceStatus `. 17 | """ 18 | SNAPSHOT_TRANSIENT_STATUSES: list[SnapshotStatus] = [ 19 | SnapshotStatus.CREATING, 20 | SnapshotStatus.DELETING, 21 | SnapshotStatus.EXPORTING, 22 | ] 23 | """ 24 | Lists transient statutes of the enum :class:`SnapshotStatus `. 25 | """ 26 | VOLUME_TRANSIENT_STATUSES: list[VolumeStatus] = [ 27 | VolumeStatus.CREATING, 28 | VolumeStatus.DELETING, 29 | VolumeStatus.RESIZING, 30 | VolumeStatus.SNAPSHOTTING, 31 | VolumeStatus.UPDATING, 32 | ] 33 | """ 34 | Lists transient statutes of the enum :class:`VolumeStatus `. 35 | """ 36 | -------------------------------------------------------------------------------- /scaleway/scaleway/block/v1alpha1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | ReferenceStatus, 6 | SnapshotStatus, 7 | VolumeStatus, 8 | ) 9 | 10 | REFERENCE_TRANSIENT_STATUSES: list[ReferenceStatus] = [ 11 | ReferenceStatus.ATTACHING, 12 | ReferenceStatus.DETACHING, 13 | ReferenceStatus.CREATING, 14 | ] 15 | """ 16 | Lists transient statutes of the enum :class:`ReferenceStatus `. 17 | """ 18 | SNAPSHOT_TRANSIENT_STATUSES: list[SnapshotStatus] = [ 19 | SnapshotStatus.CREATING, 20 | SnapshotStatus.DELETING, 21 | SnapshotStatus.EXPORTING, 22 | ] 23 | """ 24 | Lists transient statutes of the enum :class:`SnapshotStatus `. 25 | """ 26 | VOLUME_TRANSIENT_STATUSES: list[VolumeStatus] = [ 27 | VolumeStatus.CREATING, 28 | VolumeStatus.DELETING, 29 | VolumeStatus.RESIZING, 30 | VolumeStatus.SNAPSHOTTING, 31 | VolumeStatus.UPDATING, 32 | ] 33 | """ 34 | Lists transient statutes of the enum :class:`VolumeStatus `. 35 | """ 36 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/block/v1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | ReferenceStatus, 6 | SnapshotStatus, 7 | VolumeStatus, 8 | ) 9 | 10 | REFERENCE_TRANSIENT_STATUSES: list[ReferenceStatus] = [ 11 | ReferenceStatus.ATTACHING, 12 | ReferenceStatus.DETACHING, 13 | ReferenceStatus.CREATING, 14 | ] 15 | """ 16 | Lists transient statutes of the enum :class:`ReferenceStatus `. 17 | """ 18 | SNAPSHOT_TRANSIENT_STATUSES: list[SnapshotStatus] = [ 19 | SnapshotStatus.CREATING, 20 | SnapshotStatus.DELETING, 21 | SnapshotStatus.EXPORTING, 22 | ] 23 | """ 24 | Lists transient statutes of the enum :class:`SnapshotStatus `. 25 | """ 26 | VOLUME_TRANSIENT_STATUSES: list[VolumeStatus] = [ 27 | VolumeStatus.CREATING, 28 | VolumeStatus.DELETING, 29 | VolumeStatus.RESIZING, 30 | VolumeStatus.SNAPSHOTTING, 31 | VolumeStatus.UPDATING, 32 | ] 33 | """ 34 | Lists transient statutes of the enum :class:`VolumeStatus `. 35 | """ 36 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/block/v1alpha1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | ReferenceStatus, 6 | SnapshotStatus, 7 | VolumeStatus, 8 | ) 9 | 10 | REFERENCE_TRANSIENT_STATUSES: list[ReferenceStatus] = [ 11 | ReferenceStatus.ATTACHING, 12 | ReferenceStatus.DETACHING, 13 | ReferenceStatus.CREATING, 14 | ] 15 | """ 16 | Lists transient statutes of the enum :class:`ReferenceStatus `. 17 | """ 18 | SNAPSHOT_TRANSIENT_STATUSES: list[SnapshotStatus] = [ 19 | SnapshotStatus.CREATING, 20 | SnapshotStatus.DELETING, 21 | SnapshotStatus.EXPORTING, 22 | ] 23 | """ 24 | Lists transient statutes of the enum :class:`SnapshotStatus `. 25 | """ 26 | VOLUME_TRANSIENT_STATUSES: list[VolumeStatus] = [ 27 | VolumeStatus.CREATING, 28 | VolumeStatus.DELETING, 29 | VolumeStatus.RESIZING, 30 | VolumeStatus.SNAPSHOTTING, 31 | VolumeStatus.UPDATING, 32 | ] 33 | """ 34 | Lists transient statutes of the enum :class:`VolumeStatus `. 35 | """ 36 | -------------------------------------------------------------------------------- /scaleway/scaleway/__init__.py: -------------------------------------------------------------------------------- 1 | """Scaleway SDK for Python""" 2 | 3 | import importlib.metadata 4 | 5 | __version__: str = importlib.metadata.version(__name__) 6 | 7 | from scaleway_core.api import ( 8 | API, 9 | ScalewayException, 10 | ) 11 | 12 | from scaleway_core.client import Client 13 | 14 | from scaleway_core.profile import ( 15 | Profile, 16 | ProfileConfig, 17 | ProfileDefaults, 18 | ) 19 | 20 | from scaleway_core.utils.waiter import ( 21 | WaitForOptions, 22 | WaitForStopCondition, 23 | ) 24 | 25 | from scaleway_core.bridge import ( 26 | Money, 27 | Region, 28 | ALL_REGIONS, 29 | Zone, 30 | ALL_ZONES, 31 | ScwFile, 32 | ServiceInfo, 33 | TimeSeriesPoint, 34 | TimeSeries, 35 | ) 36 | 37 | __all__ = [ 38 | "API", 39 | "ScalewayException", 40 | "Client", 41 | "Profile", 42 | "ProfileConfig", 43 | "ProfileDefaults", 44 | "WaitForOptions", 45 | "WaitForStopCondition", 46 | "Money", 47 | "Region", 48 | "ALL_REGIONS", 49 | "Zone", 50 | "ALL_ZONES", 51 | "ScwFile", 52 | "ServiceInfo", 53 | "TimeSeriesPoint", 54 | "TimeSeries", 55 | ] 56 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/mongodb/v1/custom_api.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | from datetime import datetime, timezone 4 | from typing import Optional, Any 5 | 6 | from .api import MongodbV1API 7 | 8 | 9 | def _ensure_tzaware_utc(value: Optional[datetime]) -> Optional[datetime]: 10 | if value is None: 11 | return None 12 | if value.tzinfo is None or value.tzinfo.utcoffset(value) is None: 13 | return value.replace(tzinfo=timezone.utc) 14 | return value 15 | 16 | 17 | class MongodbUtilsV1API(MongodbV1API): 18 | """ 19 | Async extensions for MongoDB V1. 20 | - Naive datetimes for expires_at are assumed to be UTC. 21 | """ 22 | 23 | async def create_snapshot(self, **kwargs: Any) -> Any: 24 | expires_at = kwargs.get("expires_at") 25 | kwargs["expires_at"] = _ensure_tzaware_utc(expires_at) 26 | return await super().create_snapshot(**kwargs) 27 | 28 | async def update_snapshot(self, **kwargs: Any) -> Any: 29 | expires_at = kwargs.get("expires_at") 30 | kwargs["expires_at"] = _ensure_tzaware_utc(expires_at) 31 | return await super().update_snapshot(**kwargs) 32 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/__init__.py: -------------------------------------------------------------------------------- 1 | """Scaleway SDK for Python - Async""" 2 | 3 | import importlib.metadata 4 | 5 | __version__: str = importlib.metadata.version(__name__) 6 | 7 | from scaleway_core.api import ( 8 | API, 9 | ScalewayException, 10 | ) 11 | 12 | from scaleway_core.client import Client 13 | 14 | from scaleway_core.profile import ( 15 | Profile, 16 | ProfileConfig, 17 | ProfileDefaults, 18 | ) 19 | 20 | from scaleway_core.utils.waiter import ( 21 | WaitForOptions, 22 | WaitForStopCondition, 23 | ) 24 | 25 | from scaleway_core.bridge import ( 26 | Money, 27 | Region, 28 | ALL_REGIONS, 29 | Zone, 30 | ALL_ZONES, 31 | ScwFile, 32 | ServiceInfo, 33 | TimeSeriesPoint, 34 | TimeSeries, 35 | ) 36 | 37 | __all__ = [ 38 | "API", 39 | "ScalewayException", 40 | "Client", 41 | "Profile", 42 | "ProfileConfig", 43 | "ProfileDefaults", 44 | "WaitForOptions", 45 | "WaitForStopCondition", 46 | "Money", 47 | "Region", 48 | "ALL_REGIONS", 49 | "Zone", 50 | "ALL_ZONES", 51 | "ScwFile", 52 | "ServiceInfo", 53 | "TimeSeriesPoint", 54 | "TimeSeries", 55 | ] 56 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/mongodb/v1alpha1/custom_api.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | from datetime import datetime, timezone 4 | from typing import Optional, Any 5 | 6 | from .api import MongodbV1Alpha1API 7 | 8 | 9 | def _ensure_tzaware_utc(value: Optional[datetime]) -> Optional[datetime]: 10 | if value is None: 11 | return None 12 | if value.tzinfo is None or value.tzinfo.utcoffset(value) is None: 13 | return value.replace(tzinfo=timezone.utc) 14 | return value 15 | 16 | 17 | class MongodbUtilsV1Alpha1API(MongodbV1Alpha1API): 18 | """ 19 | Async extensions for MongoDB V1alpha1. 20 | - Naive datetimes for expires_at are assumed to be UTC. 21 | """ 22 | 23 | async def create_snapshot(self, **kwargs: Any) -> Any: 24 | expires_at = kwargs.get("expires_at") 25 | kwargs["expires_at"] = _ensure_tzaware_utc(expires_at) 26 | return await super().create_snapshot(**kwargs) 27 | 28 | async def update_snapshot(self, **kwargs: Any) -> Any: 29 | expires_at = kwargs.get("expires_at") 30 | kwargs["expires_at"] = _ensure_tzaware_utc(expires_at) 31 | return await super().update_snapshot(**kwargs) 32 | -------------------------------------------------------------------------------- /scaleway/scaleway/webhosting/v1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | BackupStatus, 6 | DomainAvailabilityStatus, 7 | DomainStatus, 8 | HostingStatus, 9 | ) 10 | 11 | BACKUP_TRANSIENT_STATUSES: list[BackupStatus] = [ 12 | BackupStatus.RESTORING, 13 | ] 14 | """ 15 | Lists transient statutes of the enum :class:`BackupStatus `. 16 | """ 17 | DOMAIN_AVAILABILITY_TRANSIENT_STATUSES: list[DomainAvailabilityStatus] = [ 18 | DomainAvailabilityStatus.VALIDATING, 19 | ] 20 | """ 21 | Lists transient statutes of the enum :class:`DomainAvailabilityStatus `. 22 | """ 23 | DOMAIN_TRANSIENT_STATUSES: list[DomainStatus] = [ 24 | DomainStatus.VALIDATING, 25 | ] 26 | """ 27 | Lists transient statutes of the enum :class:`DomainStatus `. 28 | """ 29 | HOSTING_TRANSIENT_STATUSES: list[HostingStatus] = [ 30 | HostingStatus.DELIVERING, 31 | HostingStatus.DELETING, 32 | HostingStatus.MIGRATING, 33 | HostingStatus.UPDATING, 34 | ] 35 | """ 36 | Lists transient statutes of the enum :class:`HostingStatus `. 37 | """ 38 | -------------------------------------------------------------------------------- /scaleway/scaleway/mongodb/v1/custom_api.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | from datetime import datetime, timezone 4 | from typing import Any, Optional 5 | 6 | from scaleway.mongodb.v1.api import MongodbV1API # type: ignore[import-untyped] 7 | 8 | 9 | def _ensure_tzaware_utc(value: Optional[datetime]) -> Optional[datetime]: 10 | if value is None: 11 | return None 12 | if value.tzinfo is None or value.tzinfo.utcoffset(value) is None: 13 | return value.replace(tzinfo=timezone.utc) 14 | return value 15 | 16 | 17 | class MongodbUtilsV1API(MongodbV1API): # type: ignore[misc] 18 | """ 19 | Extensions for MongoDB V1 that provide safer ergonomics. 20 | 21 | - Naive datetimes for expires_at are assumed to be UTC. 22 | """ 23 | 24 | def create_snapshot(self, **kwargs: Any) -> Any: 25 | expires_at = kwargs.get("expires_at") 26 | kwargs["expires_at"] = _ensure_tzaware_utc(expires_at) 27 | return super().create_snapshot(**kwargs) 28 | 29 | def update_snapshot(self, **kwargs: Any) -> Any: 30 | expires_at = kwargs.get("expires_at") 31 | kwargs["expires_at"] = _ensure_tzaware_utc(expires_at) 32 | return super().update_snapshot(**kwargs) 33 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/webhosting/v1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | BackupStatus, 6 | DomainAvailabilityStatus, 7 | DomainStatus, 8 | HostingStatus, 9 | ) 10 | 11 | BACKUP_TRANSIENT_STATUSES: list[BackupStatus] = [ 12 | BackupStatus.RESTORING, 13 | ] 14 | """ 15 | Lists transient statutes of the enum :class:`BackupStatus `. 16 | """ 17 | DOMAIN_AVAILABILITY_TRANSIENT_STATUSES: list[DomainAvailabilityStatus] = [ 18 | DomainAvailabilityStatus.VALIDATING, 19 | ] 20 | """ 21 | Lists transient statutes of the enum :class:`DomainAvailabilityStatus `. 22 | """ 23 | DOMAIN_TRANSIENT_STATUSES: list[DomainStatus] = [ 24 | DomainStatus.VALIDATING, 25 | ] 26 | """ 27 | Lists transient statutes of the enum :class:`DomainStatus `. 28 | """ 29 | HOSTING_TRANSIENT_STATUSES: list[HostingStatus] = [ 30 | HostingStatus.DELIVERING, 31 | HostingStatus.DELETING, 32 | HostingStatus.MIGRATING, 33 | HostingStatus.UPDATING, 34 | ] 35 | """ 36 | Lists transient statutes of the enum :class:`HostingStatus `. 37 | """ 38 | -------------------------------------------------------------------------------- /scaleway/scaleway/vpc/v2/tests/cassettes/test_vpc_get.cassette.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{}' 4 | headers: 5 | Content-Length: 6 | - '2' 7 | user-agent: 8 | - scaleway-sdk-python/2.0.0 9 | method: GET 10 | uri: https://api.scaleway.com/vpc/v2/regions/fr-par/vpcs/64bd296a-08ae-472a-9868-13dc873fefe4 11 | response: 12 | body: 13 | string: '{"id": "64bd296a-08ae-472a-9868-13dc873fefe4", "name": "vpc-test-sdk-python-eager-swartz", 14 | "tags": [], "organization_id": "11111111-1111-1111-1111-111111111111", "created_at": 15 | "2025-09-02T07:49:03.264547Z", "updated_at": "2025-09-02T07:49:03.264547Z", 16 | "project_id": "11111111-1111-1111-1111-111111111111", "is_default": false, 17 | "private_network_count": 0, "routing_enabled": true, "custom_routes_propagation_enabled": 18 | true, "region": "fr-par"}' 19 | headers: 20 | content-length: 21 | - '419' 22 | date: 23 | - Tue, 02 Sep 2025 07:49:13 GMT 24 | server: 25 | - Scaleway API Gateway (fr-par-3;edge01) 26 | x-request-id: 27 | - be5e9088-5d3d-414a-b2d9-d071ef5c0d8d 28 | status: 29 | code: 200 30 | message: OK 31 | version: 1 32 | -------------------------------------------------------------------------------- /scaleway/scaleway/baremetal/v1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | ServerInstallStatus, 6 | ServerPrivateNetworkStatus, 7 | ServerStatus, 8 | ) 9 | 10 | SERVER_INSTALL_TRANSIENT_STATUSES: list[ServerInstallStatus] = [ 11 | ServerInstallStatus.TO_INSTALL, 12 | ServerInstallStatus.INSTALLING, 13 | ] 14 | """ 15 | Lists transient statutes of the enum :class:`ServerInstallStatus `. 16 | """ 17 | SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES: list[ServerPrivateNetworkStatus] = [ 18 | ServerPrivateNetworkStatus.ATTACHING, 19 | ServerPrivateNetworkStatus.DETACHING, 20 | ] 21 | """ 22 | Lists transient statutes of the enum :class:`ServerPrivateNetworkStatus `. 23 | """ 24 | SERVER_TRANSIENT_STATUSES: list[ServerStatus] = [ 25 | ServerStatus.DELIVERING, 26 | ServerStatus.STOPPING, 27 | ServerStatus.STARTING, 28 | ServerStatus.DELETING, 29 | ServerStatus.ORDERED, 30 | ServerStatus.RESETTING, 31 | ServerStatus.MIGRATING, 32 | ] 33 | """ 34 | Lists transient statutes of the enum :class:`ServerStatus `. 35 | """ 36 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/baremetal/v1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | ServerInstallStatus, 6 | ServerPrivateNetworkStatus, 7 | ServerStatus, 8 | ) 9 | 10 | SERVER_INSTALL_TRANSIENT_STATUSES: list[ServerInstallStatus] = [ 11 | ServerInstallStatus.TO_INSTALL, 12 | ServerInstallStatus.INSTALLING, 13 | ] 14 | """ 15 | Lists transient statutes of the enum :class:`ServerInstallStatus `. 16 | """ 17 | SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES: list[ServerPrivateNetworkStatus] = [ 18 | ServerPrivateNetworkStatus.ATTACHING, 19 | ServerPrivateNetworkStatus.DETACHING, 20 | ] 21 | """ 22 | Lists transient statutes of the enum :class:`ServerPrivateNetworkStatus `. 23 | """ 24 | SERVER_TRANSIENT_STATUSES: list[ServerStatus] = [ 25 | ServerStatus.DELIVERING, 26 | ServerStatus.STOPPING, 27 | ServerStatus.STARTING, 28 | ServerStatus.DELETING, 29 | ServerStatus.ORDERED, 30 | ServerStatus.RESETTING, 31 | ServerStatus.MIGRATING, 32 | ] 33 | """ 34 | Lists transient statutes of the enum :class:`ServerStatus `. 35 | """ 36 | -------------------------------------------------------------------------------- /scaleway/scaleway/environmental_footprint/v1alpha1/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | from .types import ProductCategory 4 | from .types import ReportType 5 | from .types import ServiceCategory 6 | from .types import Impact 7 | from .types import SkuImpact 8 | from .types import ZoneImpact 9 | from .types import RegionImpact 10 | from .types import ProjectImpact 11 | from .types import ImpactDataResponse 12 | from .types import ImpactReportAvailability 13 | from .types import UserApiDownloadImpactReportRequest 14 | from .types import UserApiGetImpactDataRequest 15 | from .types import UserApiGetImpactReportAvailabilityRequest 16 | from .api import EnvironmentalFootprintV1Alpha1UserAPI 17 | 18 | __all__ = [ 19 | "ProductCategory", 20 | "ReportType", 21 | "ServiceCategory", 22 | "Impact", 23 | "SkuImpact", 24 | "ZoneImpact", 25 | "RegionImpact", 26 | "ProjectImpact", 27 | "ImpactDataResponse", 28 | "ImpactReportAvailability", 29 | "UserApiDownloadImpactReportRequest", 30 | "UserApiGetImpactDataRequest", 31 | "UserApiGetImpactReportAvailabilityRequest", 32 | "EnvironmentalFootprintV1Alpha1UserAPI", 33 | ] 34 | -------------------------------------------------------------------------------- /scaleway/scaleway/mongodb/v1alpha1/custom_api.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | 3 | from datetime import datetime, timezone 4 | from typing import Any, Optional 5 | 6 | from scaleway.mongodb.v1alpha1.api import MongodbV1Alpha1API # type: ignore[import-untyped] 7 | 8 | 9 | def _ensure_tzaware_utc(value: Optional[datetime]) -> Optional[datetime]: 10 | if value is None: 11 | return None 12 | if value.tzinfo is None or value.tzinfo.utcoffset(value) is None: 13 | return value.replace(tzinfo=timezone.utc) 14 | return value 15 | 16 | 17 | class MongodbUtilsV1Alpha1API(MongodbV1Alpha1API): # type: ignore[misc] 18 | """ 19 | Extensions for MongoDB V1alpha1 that provide safer ergonomics. 20 | 21 | - Naive datetimes for expires_at are assumed to be UTC. 22 | """ 23 | 24 | def create_snapshot(self, **kwargs: Any) -> Any: 25 | expires_at = kwargs.get("expires_at") 26 | kwargs["expires_at"] = _ensure_tzaware_utc(expires_at) 27 | return super().create_snapshot(**kwargs) 28 | 29 | def update_snapshot(self, **kwargs: Any) -> Any: 30 | expires_at = kwargs.get("expires_at") 31 | kwargs["expires_at"] = _ensure_tzaware_utc(expires_at) 32 | return super().update_snapshot(**kwargs) 33 | -------------------------------------------------------------------------------- /scaleway/scaleway/qaas/v1alpha1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | BookingStatus, 6 | JobStatus, 7 | ProcessStatus, 8 | SessionStatus, 9 | ) 10 | 11 | BOOKING_TRANSIENT_STATUSES: list[BookingStatus] = [ 12 | BookingStatus.WAITING, 13 | BookingStatus.VALIDATING, 14 | BookingStatus.CANCELLING, 15 | ] 16 | """ 17 | Lists transient statutes of the enum :class:`BookingStatus `. 18 | """ 19 | JOB_TRANSIENT_STATUSES: list[JobStatus] = [ 20 | JobStatus.WAITING, 21 | JobStatus.RUNNING, 22 | JobStatus.CANCELLING, 23 | ] 24 | """ 25 | Lists transient statutes of the enum :class:`JobStatus `. 26 | """ 27 | PROCESS_TRANSIENT_STATUSES: list[ProcessStatus] = [ 28 | ProcessStatus.STARTING, 29 | ProcessStatus.RUNNING, 30 | ProcessStatus.CANCELLING, 31 | ] 32 | """ 33 | Lists transient statutes of the enum :class:`ProcessStatus `. 34 | """ 35 | SESSION_TRANSIENT_STATUSES: list[SessionStatus] = [ 36 | SessionStatus.STARTING, 37 | SessionStatus.STOPPING, 38 | ] 39 | """ 40 | Lists transient statutes of the enum :class:`SessionStatus `. 41 | """ 42 | -------------------------------------------------------------------------------- /scaleway/scaleway/test/v1/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | from .types import EyeColors 4 | from .types import HumanStatus 5 | from .content import HUMAN_TRANSIENT_STATUSES 6 | from .types import ListHumansRequestOrderBy 7 | from .types import Human 8 | from .types import CreateHumanRequest 9 | from .types import DeleteHumanRequest 10 | from .types import GetHumanRequest 11 | from .types import ListHumansRequest 12 | from .types import ListHumansResponse 13 | from .types import RegisterRequest 14 | from .types import RegisterResponse 15 | from .types import RunHumanRequest 16 | from .types import SmokeHumanRequest 17 | from .types import UpdateHumanRequest 18 | from .api import TestV1API 19 | 20 | __all__ = [ 21 | "EyeColors", 22 | "HumanStatus", 23 | "HUMAN_TRANSIENT_STATUSES", 24 | "ListHumansRequestOrderBy", 25 | "Human", 26 | "CreateHumanRequest", 27 | "DeleteHumanRequest", 28 | "GetHumanRequest", 29 | "ListHumansRequest", 30 | "ListHumansResponse", 31 | "RegisterRequest", 32 | "RegisterResponse", 33 | "RunHumanRequest", 34 | "SmokeHumanRequest", 35 | "UpdateHumanRequest", 36 | "TestV1API", 37 | ] 38 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/environmental_footprint/v1alpha1/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | from .types import ProductCategory 4 | from .types import ReportType 5 | from .types import ServiceCategory 6 | from .types import Impact 7 | from .types import SkuImpact 8 | from .types import ZoneImpact 9 | from .types import RegionImpact 10 | from .types import ProjectImpact 11 | from .types import ImpactDataResponse 12 | from .types import ImpactReportAvailability 13 | from .types import UserApiDownloadImpactReportRequest 14 | from .types import UserApiGetImpactDataRequest 15 | from .types import UserApiGetImpactReportAvailabilityRequest 16 | from .api import EnvironmentalFootprintV1Alpha1UserAPI 17 | 18 | __all__ = [ 19 | "ProductCategory", 20 | "ReportType", 21 | "ServiceCategory", 22 | "Impact", 23 | "SkuImpact", 24 | "ZoneImpact", 25 | "RegionImpact", 26 | "ProjectImpact", 27 | "ImpactDataResponse", 28 | "ImpactReportAvailability", 29 | "UserApiDownloadImpactReportRequest", 30 | "UserApiGetImpactDataRequest", 31 | "UserApiGetImpactReportAvailabilityRequest", 32 | "EnvironmentalFootprintV1Alpha1UserAPI", 33 | ] 34 | -------------------------------------------------------------------------------- /scaleway-core/scaleway_core/validations/string_validation.py: -------------------------------------------------------------------------------- 1 | import re 2 | import uuid 3 | from urllib.parse import urlparse 4 | 5 | _is_access_key_regex = re.compile(r"^SCW[A-Z0-9]{17}$", re.IGNORECASE) 6 | 7 | 8 | def is_access_key(s: str) -> bool: 9 | return _is_access_key_regex.match(s) is not None 10 | 11 | 12 | def _is_uuid(s: str) -> bool: 13 | try: 14 | uuid.UUID(s) 15 | return True 16 | except ValueError: 17 | return False 18 | 19 | 20 | def is_secret_key(s: str) -> bool: 21 | return _is_uuid(s) 22 | 23 | 24 | def is_organization_id(s: str) -> bool: 25 | return _is_uuid(s) 26 | 27 | 28 | def is_project_id(s: str) -> bool: 29 | return _is_uuid(s) 30 | 31 | 32 | _is_region_regex = re.compile(r"^[a-z]{2}-[a-z]{3}$", re.IGNORECASE) 33 | 34 | 35 | def is_region(s: str) -> bool: 36 | return _is_region_regex.match(s) is not None 37 | 38 | 39 | _is_zone_regex = re.compile(r"^[a-z]{2}-[a-z]{3}-[1-9]$", re.IGNORECASE) 40 | 41 | 42 | def is_zone(s: str) -> bool: 43 | return _is_zone_regex.match(s) is not None 44 | 45 | 46 | def is_url(s: str) -> bool: 47 | try: 48 | result = urlparse(s) 49 | return all([result.scheme, result.netloc]) 50 | except ValueError: 51 | return False 52 | -------------------------------------------------------------------------------- /scaleway/scaleway/lb/v1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | CertificateStatus, 6 | InstanceStatus, 7 | LbStatus, 8 | PrivateNetworkStatus, 9 | ) 10 | 11 | CERTIFICATE_TRANSIENT_STATUSES: list[CertificateStatus] = [ 12 | CertificateStatus.PENDING, 13 | ] 14 | """ 15 | Lists transient statutes of the enum :class:`CertificateStatus `. 16 | """ 17 | INSTANCE_TRANSIENT_STATUSES: list[InstanceStatus] = [ 18 | InstanceStatus.PENDING, 19 | InstanceStatus.MIGRATING, 20 | ] 21 | """ 22 | Lists transient statutes of the enum :class:`InstanceStatus `. 23 | """ 24 | LB_TRANSIENT_STATUSES: list[LbStatus] = [ 25 | LbStatus.PENDING, 26 | LbStatus.MIGRATING, 27 | LbStatus.TO_CREATE, 28 | LbStatus.CREATING, 29 | LbStatus.TO_DELETE, 30 | LbStatus.DELETING, 31 | ] 32 | """ 33 | Lists transient statutes of the enum :class:`LbStatus `. 34 | """ 35 | PRIVATE_NETWORK_TRANSIENT_STATUSES: list[PrivateNetworkStatus] = [ 36 | PrivateNetworkStatus.PENDING, 37 | ] 38 | """ 39 | Lists transient statutes of the enum :class:`PrivateNetworkStatus `. 40 | """ 41 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/test/v1/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | from .types import EyeColors 4 | from .types import HumanStatus 5 | from .content import HUMAN_TRANSIENT_STATUSES 6 | from .types import ListHumansRequestOrderBy 7 | from .types import Human 8 | from .types import CreateHumanRequest 9 | from .types import DeleteHumanRequest 10 | from .types import GetHumanRequest 11 | from .types import ListHumansRequest 12 | from .types import ListHumansResponse 13 | from .types import RegisterRequest 14 | from .types import RegisterResponse 15 | from .types import RunHumanRequest 16 | from .types import SmokeHumanRequest 17 | from .types import UpdateHumanRequest 18 | from .api import TestV1API 19 | 20 | __all__ = [ 21 | "EyeColors", 22 | "HumanStatus", 23 | "HUMAN_TRANSIENT_STATUSES", 24 | "ListHumansRequestOrderBy", 25 | "Human", 26 | "CreateHumanRequest", 27 | "DeleteHumanRequest", 28 | "GetHumanRequest", 29 | "ListHumansRequest", 30 | "ListHumansResponse", 31 | "RegisterRequest", 32 | "RegisterResponse", 33 | "RunHumanRequest", 34 | "SmokeHumanRequest", 35 | "UpdateHumanRequest", 36 | "TestV1API", 37 | ] 38 | -------------------------------------------------------------------------------- /docs/conf.py: -------------------------------------------------------------------------------- 1 | # Configuration file for the Sphinx documentation builder. 2 | # 3 | # For the full list of built-in configuration values, see the documentation: 4 | # https://www.sphinx-doc.org/en/master/usage/configuration.html 5 | 6 | # -- Project information ----------------------------------------------------- 7 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information 8 | 9 | import os 10 | import sys 11 | 12 | 13 | project = "Scaleway Python SDK" 14 | copyright = "2022, Scaleway" 15 | author = "Scaleway" 16 | 17 | # -- General configuration --------------------------------------------------- 18 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration 19 | 20 | extensions = [ 21 | "sphinx.ext.autodoc", 22 | "sphinx.ext.autosummary", 23 | "sphinx_rtd_theme", 24 | ] 25 | autosummary_generate = True 26 | 27 | templates_path = ["_templates"] 28 | exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] 29 | 30 | 31 | # -- Options for HTML output ------------------------------------------------- 32 | # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output 33 | 34 | html_theme = "sphinx_rtd_theme" 35 | html_static_path = ["_static"] 36 | 37 | sys.path.insert(0, os.path.abspath("..")) 38 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/qaas/v1alpha1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | BookingStatus, 6 | JobStatus, 7 | ProcessStatus, 8 | SessionStatus, 9 | ) 10 | 11 | BOOKING_TRANSIENT_STATUSES: list[BookingStatus] = [ 12 | BookingStatus.WAITING, 13 | BookingStatus.VALIDATING, 14 | BookingStatus.CANCELLING, 15 | ] 16 | """ 17 | Lists transient statutes of the enum :class:`BookingStatus `. 18 | """ 19 | JOB_TRANSIENT_STATUSES: list[JobStatus] = [ 20 | JobStatus.WAITING, 21 | JobStatus.RUNNING, 22 | JobStatus.CANCELLING, 23 | ] 24 | """ 25 | Lists transient statutes of the enum :class:`JobStatus `. 26 | """ 27 | PROCESS_TRANSIENT_STATUSES: list[ProcessStatus] = [ 28 | ProcessStatus.STARTING, 29 | ProcessStatus.RUNNING, 30 | ProcessStatus.CANCELLING, 31 | ] 32 | """ 33 | Lists transient statutes of the enum :class:`ProcessStatus `. 34 | """ 35 | SESSION_TRANSIENT_STATUSES: list[SessionStatus] = [ 36 | SessionStatus.STARTING, 37 | SessionStatus.STOPPING, 38 | ] 39 | """ 40 | Lists transient statutes of the enum :class:`SessionStatus `. 41 | """ 42 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/lb/v1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | CertificateStatus, 6 | InstanceStatus, 7 | LbStatus, 8 | PrivateNetworkStatus, 9 | ) 10 | 11 | CERTIFICATE_TRANSIENT_STATUSES: list[CertificateStatus] = [ 12 | CertificateStatus.PENDING, 13 | ] 14 | """ 15 | Lists transient statutes of the enum :class:`CertificateStatus `. 16 | """ 17 | INSTANCE_TRANSIENT_STATUSES: list[InstanceStatus] = [ 18 | InstanceStatus.PENDING, 19 | InstanceStatus.MIGRATING, 20 | ] 21 | """ 22 | Lists transient statutes of the enum :class:`InstanceStatus `. 23 | """ 24 | LB_TRANSIENT_STATUSES: list[LbStatus] = [ 25 | LbStatus.PENDING, 26 | LbStatus.MIGRATING, 27 | LbStatus.TO_CREATE, 28 | LbStatus.CREATING, 29 | LbStatus.TO_DELETE, 30 | LbStatus.DELETING, 31 | ] 32 | """ 33 | Lists transient statutes of the enum :class:`LbStatus `. 34 | """ 35 | PRIVATE_NETWORK_TRANSIENT_STATUSES: list[PrivateNetworkStatus] = [ 36 | PrivateNetworkStatus.PENDING, 37 | ] 38 | """ 39 | Lists transient statutes of the enum :class:`PrivateNetworkStatus `. 40 | """ 41 | -------------------------------------------------------------------------------- /scaleway/scaleway/ipam/v1/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | from .types import ListIPsRequestOrderBy 4 | from .types import ResourceType 5 | from .types import Resource 6 | from .types import Reverse 7 | from .types import Source 8 | from .types import CustomResource 9 | from .types import IP 10 | from .types import AttachIPRequest 11 | from .types import BookIPRequest 12 | from .types import DetachIPRequest 13 | from .types import GetIPRequest 14 | from .types import ListIPsRequest 15 | from .types import ListIPsResponse 16 | from .types import MoveIPRequest 17 | from .types import ReleaseIPRequest 18 | from .types import ReleaseIPSetRequest 19 | from .types import UpdateIPRequest 20 | from .api import IpamV1API 21 | 22 | __all__ = [ 23 | "ListIPsRequestOrderBy", 24 | "ResourceType", 25 | "Resource", 26 | "Reverse", 27 | "Source", 28 | "CustomResource", 29 | "IP", 30 | "AttachIPRequest", 31 | "BookIPRequest", 32 | "DetachIPRequest", 33 | "GetIPRequest", 34 | "ListIPsRequest", 35 | "ListIPsResponse", 36 | "MoveIPRequest", 37 | "ReleaseIPRequest", 38 | "ReleaseIPSetRequest", 39 | "UpdateIPRequest", 40 | "IpamV1API", 41 | ] 42 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/ipam/v1/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | from .types import ListIPsRequestOrderBy 4 | from .types import ResourceType 5 | from .types import Resource 6 | from .types import Reverse 7 | from .types import Source 8 | from .types import CustomResource 9 | from .types import IP 10 | from .types import AttachIPRequest 11 | from .types import BookIPRequest 12 | from .types import DetachIPRequest 13 | from .types import GetIPRequest 14 | from .types import ListIPsRequest 15 | from .types import ListIPsResponse 16 | from .types import MoveIPRequest 17 | from .types import ReleaseIPRequest 18 | from .types import ReleaseIPSetRequest 19 | from .types import UpdateIPRequest 20 | from .api import IpamV1API 21 | 22 | __all__ = [ 23 | "ListIPsRequestOrderBy", 24 | "ResourceType", 25 | "Resource", 26 | "Reverse", 27 | "Source", 28 | "CustomResource", 29 | "IP", 30 | "AttachIPRequest", 31 | "BookIPRequest", 32 | "DetachIPRequest", 33 | "GetIPRequest", 34 | "ListIPsRequest", 35 | "ListIPsResponse", 36 | "MoveIPRequest", 37 | "ReleaseIPRequest", 38 | "ReleaseIPSetRequest", 39 | "UpdateIPRequest", 40 | "IpamV1API", 41 | ] 42 | -------------------------------------------------------------------------------- /scaleway-core/scaleway_core/bridge/scwfile.py: -------------------------------------------------------------------------------- 1 | from dataclasses import dataclass 2 | from typing import Any, Dict 3 | 4 | from scaleway_core.profile import ProfileDefaults 5 | 6 | 7 | @dataclass 8 | class ScwFile: 9 | """ 10 | Represents a Scaleway file. 11 | """ 12 | 13 | name: str 14 | """ 15 | Name of the file. 16 | """ 17 | 18 | content_type: str 19 | """ 20 | Content-type of the file. 21 | """ 22 | 23 | content: str 24 | """ 25 | Content of the file in base64. 26 | """ 27 | 28 | 29 | def unmarshal_ScwFile(data: Any) -> ScwFile: 30 | """ 31 | Unmarshals a ScwFile object from a dict. 32 | """ 33 | if not isinstance(data, dict): 34 | raise TypeError( 35 | "Unmarshalling the type 'ScwFile' failed as data isn't a dictionary." 36 | ) 37 | 38 | return ScwFile( 39 | name=data["name"], 40 | content_type=data["content_type"], 41 | content=data["content"], 42 | ) 43 | 44 | 45 | def marshal_ScwFile(obj: ScwFile, _defaults: ProfileDefaults | None) -> Dict[str, Any]: 46 | """ 47 | Marshals a ScwFile object into a dict. 48 | """ 49 | return { 50 | "name": obj.name, 51 | "content_type": obj.content_type, 52 | "content": obj.content, 53 | } 54 | -------------------------------------------------------------------------------- /scaleway/scaleway/vpc/v2/tests/cassettes/test_vpc_update.cassette.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"tags": ["sdk-python", "regression-test"]}' 4 | headers: 5 | Content-Length: 6 | - '43' 7 | user-agent: 8 | - scaleway-sdk-python/2.0.0 9 | method: PATCH 10 | uri: https://api.scaleway.com/vpc/v2/regions/fr-par/vpcs/64bd296a-08ae-472a-9868-13dc873fefe4 11 | response: 12 | body: 13 | string: '{"id": "64bd296a-08ae-472a-9868-13dc873fefe4", "name": "vpc-test-sdk-python-eager-swartz", 14 | "tags": ["sdk-python", "regression-test"], "organization_id": "11111111-1111-1111-1111-111111111111", 15 | "created_at": "2025-09-02T07:49:03.264547Z", "updated_at": "2025-09-02T07:49:13.569326Z", 16 | "project_id": "11111111-1111-1111-1111-111111111111", "is_default": false, 17 | "private_network_count": 0, "routing_enabled": true, "custom_routes_propagation_enabled": 18 | true, "region": "fr-par"}' 19 | headers: 20 | content-length: 21 | - '449' 22 | date: 23 | - Tue, 02 Sep 2025 07:49:13 GMT 24 | server: 25 | - Scaleway API Gateway (fr-par-3;edge02) 26 | x-request-id: 27 | - 4c1f3068-e1b3-4032-8a8e-6ddc39f7b72a 28 | status: 29 | code: 200 30 | message: OK 31 | version: 1 32 | -------------------------------------------------------------------------------- /scaleway/scaleway/file/v1alpha1/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | from .types import AttachmentResourceType 4 | from .types import FileSystemStatus 5 | from .content import FILE_SYSTEM_TRANSIENT_STATUSES 6 | from .types import ListFileSystemsRequestOrderBy 7 | from .types import Attachment 8 | from .types import FileSystem 9 | from .types import CreateFileSystemRequest 10 | from .types import DeleteFileSystemRequest 11 | from .types import GetFileSystemRequest 12 | from .types import ListAttachmentsRequest 13 | from .types import ListAttachmentsResponse 14 | from .types import ListFileSystemsRequest 15 | from .types import ListFileSystemsResponse 16 | from .types import UpdateFileSystemRequest 17 | from .api import FileV1Alpha1API 18 | 19 | __all__ = [ 20 | "AttachmentResourceType", 21 | "FileSystemStatus", 22 | "FILE_SYSTEM_TRANSIENT_STATUSES", 23 | "ListFileSystemsRequestOrderBy", 24 | "Attachment", 25 | "FileSystem", 26 | "CreateFileSystemRequest", 27 | "DeleteFileSystemRequest", 28 | "GetFileSystemRequest", 29 | "ListAttachmentsRequest", 30 | "ListAttachmentsResponse", 31 | "ListFileSystemsRequest", 32 | "ListFileSystemsResponse", 33 | "UpdateFileSystemRequest", 34 | "FileV1Alpha1API", 35 | ] 36 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/file/v1alpha1/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | from .types import AttachmentResourceType 4 | from .types import FileSystemStatus 5 | from .content import FILE_SYSTEM_TRANSIENT_STATUSES 6 | from .types import ListFileSystemsRequestOrderBy 7 | from .types import Attachment 8 | from .types import FileSystem 9 | from .types import CreateFileSystemRequest 10 | from .types import DeleteFileSystemRequest 11 | from .types import GetFileSystemRequest 12 | from .types import ListAttachmentsRequest 13 | from .types import ListAttachmentsResponse 14 | from .types import ListFileSystemsRequest 15 | from .types import ListFileSystemsResponse 16 | from .types import UpdateFileSystemRequest 17 | from .api import FileV1Alpha1API 18 | 19 | __all__ = [ 20 | "AttachmentResourceType", 21 | "FileSystemStatus", 22 | "FILE_SYSTEM_TRANSIENT_STATUSES", 23 | "ListFileSystemsRequestOrderBy", 24 | "Attachment", 25 | "FileSystem", 26 | "CreateFileSystemRequest", 27 | "DeleteFileSystemRequest", 28 | "GetFileSystemRequest", 29 | "ListAttachmentsRequest", 30 | "ListAttachmentsResponse", 31 | "ListFileSystemsRequest", 32 | "ListFileSystemsResponse", 33 | "UpdateFileSystemRequest", 34 | "FileV1Alpha1API", 35 | ] 36 | -------------------------------------------------------------------------------- /.github/workflows/checks.yml: -------------------------------------------------------------------------------- 1 | name: Tests 2 | permissions: 3 | contents: read 4 | 5 | on: 6 | push: 7 | branches: 8 | - main 9 | pull_request: 10 | merge_group: 11 | 12 | jobs: 13 | tests: 14 | runs-on: ubuntu-latest 15 | strategy: 16 | matrix: 17 | lib: 18 | - scaleway-core 19 | - scaleway 20 | - scaleway-async 21 | python-version: [ '3.10' ,'3.11', '3.12', '3.13' ] 22 | defaults: 23 | run: 24 | working-directory: ${{ matrix.lib }} 25 | steps: 26 | - uses: actions/checkout@v6 27 | - name: Install poetry 28 | run: pipx install poetry 29 | - name: Set up Python 30 | uses: actions/setup-python@v6 31 | with: 32 | python-version: ${{ matrix.python-version }} 33 | cache: "poetry" 34 | - name: Install dependencies and library 35 | run: poetry install 36 | - name: Run tests 37 | env: 38 | SCW_ACCESS_KEY: ${{ secrets.SCW_ACCESS_KEY }} 39 | SCW_SECRET_KEY: ${{ secrets.SCW_SECRET_KEY }} 40 | SCW_DEFAULT_PROJECT_ID: ${{ secrets.SCW_DEFAULT_PROJECT_ID }} 41 | SCW_DEFAULT_ORGANIZATION_ID: ${{ secrets.SCW_DEFAULT_ORGANIZATION_ID }} 42 | SCW_DEFAULT_REGION: ${{ secrets.SCW_DEFAULT_REGION }} 43 | REPLAY_CASSETTES: true 44 | run: poetry run pytest -v 45 | 46 | -------------------------------------------------------------------------------- /scaleway/scaleway/baremetal/v3/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | from .types import ListServerPrivateNetworksRequestOrderBy 4 | from .types import ServerPrivateNetworkStatus 5 | from .content import SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES 6 | from .types import ServerPrivateNetwork 7 | from .types import ListServerPrivateNetworksResponse 8 | from .types import PrivateNetworkApiAddServerPrivateNetworkRequest 9 | from .types import PrivateNetworkApiDeleteServerPrivateNetworkRequest 10 | from .types import PrivateNetworkApiListServerPrivateNetworksRequest 11 | from .types import PrivateNetworkApiSetServerPrivateNetworksRequest 12 | from .types import SetServerPrivateNetworksResponse 13 | from .api import BaremetalV3PrivateNetworkAPI 14 | 15 | __all__ = [ 16 | "ListServerPrivateNetworksRequestOrderBy", 17 | "ServerPrivateNetworkStatus", 18 | "SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES", 19 | "ServerPrivateNetwork", 20 | "ListServerPrivateNetworksResponse", 21 | "PrivateNetworkApiAddServerPrivateNetworkRequest", 22 | "PrivateNetworkApiDeleteServerPrivateNetworkRequest", 23 | "PrivateNetworkApiListServerPrivateNetworksRequest", 24 | "PrivateNetworkApiSetServerPrivateNetworksRequest", 25 | "SetServerPrivateNetworksResponse", 26 | "BaremetalV3PrivateNetworkAPI", 27 | ] 28 | -------------------------------------------------------------------------------- /.github/workflows/pytest-cov.yml: -------------------------------------------------------------------------------- 1 | name: Pytest-cov 2 | 3 | permissions: 4 | contents: read 5 | 6 | on: 7 | push: 8 | branches: 9 | - main 10 | pull_request: 11 | merge_group: 12 | 13 | jobs: 14 | pytest-cov: 15 | runs-on: ubuntu-latest 16 | strategy: 17 | matrix: 18 | lib: 19 | - scaleway-core 20 | - scaleway 21 | - scaleway-async 22 | python-version: [ '3.10' ,'3.11', '3.12', '3.13' ] 23 | defaults: 24 | run: 25 | working-directory: ${{ matrix.lib }} 26 | steps: 27 | - uses: actions/checkout@v6 28 | - name: Install poetry 29 | run: pipx install poetry 30 | - name: Set up Python 31 | uses: actions/setup-python@v6 32 | with: 33 | python-version: ${{ matrix.python-version }} 34 | cache: "poetry" 35 | - name: Install dependencies and library 36 | run: poetry install 37 | - name: Run tests with coverage 38 | run: poetry run pytest --cov --junitxml=junit.xml -o junit_family=legacy 39 | - name: Upload coverage to Codecov 40 | uses: codecov/codecov-action@v5 41 | with: 42 | token: ${{ secrets.CODECOV_TOKEN }} 43 | - name: Upload test results to Codecov 44 | if: ${{ !cancelled() }} 45 | uses: codecov/test-results-action@v1 46 | with: 47 | token: ${{ secrets.CODECOV_TOKEN }} -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/baremetal/v3/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | from .types import ListServerPrivateNetworksRequestOrderBy 4 | from .types import ServerPrivateNetworkStatus 5 | from .content import SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES 6 | from .types import ServerPrivateNetwork 7 | from .types import ListServerPrivateNetworksResponse 8 | from .types import PrivateNetworkApiAddServerPrivateNetworkRequest 9 | from .types import PrivateNetworkApiDeleteServerPrivateNetworkRequest 10 | from .types import PrivateNetworkApiListServerPrivateNetworksRequest 11 | from .types import PrivateNetworkApiSetServerPrivateNetworksRequest 12 | from .types import SetServerPrivateNetworksResponse 13 | from .api import BaremetalV3PrivateNetworkAPI 14 | 15 | __all__ = [ 16 | "ListServerPrivateNetworksRequestOrderBy", 17 | "ServerPrivateNetworkStatus", 18 | "SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES", 19 | "ServerPrivateNetwork", 20 | "ListServerPrivateNetworksResponse", 21 | "PrivateNetworkApiAddServerPrivateNetworkRequest", 22 | "PrivateNetworkApiDeleteServerPrivateNetworkRequest", 23 | "PrivateNetworkApiListServerPrivateNetworksRequest", 24 | "PrivateNetworkApiSetServerPrivateNetworksRequest", 25 | "SetServerPrivateNetworksResponse", 26 | "BaremetalV3PrivateNetworkAPI", 27 | ] 28 | -------------------------------------------------------------------------------- /scaleway-async/tests/utils.py: -------------------------------------------------------------------------------- 1 | import random 2 | import uuid 3 | from datetime import datetime, timezone 4 | from typing import Union 5 | 6 | from scaleway_core.profile import ProfileDefaults 7 | 8 | system_random = random.SystemRandom() 9 | 10 | 11 | def random_name() -> str: 12 | return "test-{}".format(uuid.uuid4().hex) 13 | 14 | 15 | def random_access_key() -> str: 16 | return "SCW" + "".join( 17 | system_random.choices("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", k=16) 18 | ) 19 | 20 | 21 | def string_to_datetime(date: str) -> datetime: 22 | return datetime.strptime(date, "%Y-%m-%dT%H:%M:%SZ").astimezone(timezone.utc) 23 | 24 | 25 | def random_date(min: Union[str, datetime], max: Union[str, datetime]) -> datetime: 26 | min_time = min if isinstance(min, datetime) else string_to_datetime(min) 27 | max_time = max if isinstance(max, datetime) else string_to_datetime(max) 28 | 29 | return min_time + system_random.random() * (max_time - min_time) 30 | 31 | 32 | def datetime_to_string(date: datetime) -> str: 33 | return date.strftime("%Y-%m-%dT%H:%M:%SZ") 34 | 35 | 36 | def random_date_string(min: str, max: str) -> str: 37 | return datetime_to_string(random_date(min, max)) 38 | 39 | 40 | def random_profile_defaults() -> ProfileDefaults: 41 | return ProfileDefaults( 42 | default_organization_id=uuid.uuid4().hex, 43 | default_project_id=uuid.uuid4().hex, 44 | ) 45 | -------------------------------------------------------------------------------- /scaleway-core/tests/utils.py: -------------------------------------------------------------------------------- 1 | import random 2 | import uuid 3 | from datetime import datetime, timezone 4 | from typing import Union 5 | 6 | from scaleway_core.profile import ProfileDefaults 7 | 8 | system_random = random.SystemRandom() 9 | 10 | 11 | def random_name() -> str: 12 | return "test-{}".format(uuid.uuid4().hex) 13 | 14 | 15 | def random_access_key() -> str: 16 | return "SCW" + "".join( 17 | system_random.choices("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", k=16) 18 | ) 19 | 20 | 21 | def string_to_datetime(date: str) -> datetime: 22 | return datetime.strptime(date, "%Y-%m-%dT%H:%M:%SZ").astimezone(timezone.utc) 23 | 24 | 25 | def random_date(min: Union[str, datetime], max: Union[str, datetime]) -> datetime: 26 | min_time = min if isinstance(min, datetime) else string_to_datetime(min) 27 | max_time = max if isinstance(max, datetime) else string_to_datetime(max) 28 | 29 | return min_time + system_random.random() * (max_time - min_time) 30 | 31 | 32 | def datetime_to_string(date: datetime) -> str: 33 | return date.strftime("%Y-%m-%dT%H:%M:%SZ") 34 | 35 | 36 | def random_date_string(min: str, max: str) -> str: 37 | return datetime_to_string(random_date(min, max)) 38 | 39 | 40 | def random_profile_defaults() -> ProfileDefaults: 41 | return ProfileDefaults( 42 | default_organization_id=uuid.uuid4().hex, 43 | default_project_id=uuid.uuid4().hex, 44 | ) 45 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 🚀 Feature request 3 | about: I have a suggestion (and might want to implement it myself 🙂)! 4 | labels: enhancement 5 | --- 6 | 7 | 8 | 9 | ### Community Note 10 | 11 | * Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request 12 | * Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request 13 | * If you are interested in working on this issue or have submitted a pull request, please leave a comment 14 | 15 | 16 | 17 | ## Description 18 | 19 | 20 | 21 | ## Proposed Solution 22 | 23 | 24 | 25 | ```python 26 | # Example of a possible API usage 27 | from scaleway.instance.v1.custom_api import InstanceUtilsV1API 28 | from scaleway_core.client import Client 29 | 30 | client = Client.from_config_file_and_env() 31 | instance_api = InstanceUtilsV1API(client) 32 | server = instance_api.new_feature(...) 33 | ``` 34 | -------------------------------------------------------------------------------- /.github/workflows/lint.yml: -------------------------------------------------------------------------------- 1 | name: Check linters 2 | permissions: 3 | contents: read 4 | 5 | on: 6 | push: 7 | branches: 8 | - main 9 | pull_request: 10 | merge_group: 11 | 12 | jobs: 13 | ruff: 14 | runs-on: ubuntu-latest 15 | strategy: 16 | matrix: 17 | lib: 18 | - scaleway-core 19 | - scaleway 20 | - scaleway-async 21 | python-version: [ '3.10' ,'3.11', '3.12', '3.13' ] 22 | defaults: 23 | run: 24 | working-directory: ${{ matrix.lib }} 25 | steps: 26 | - uses: actions/checkout@v6 27 | - name: Install poetry 28 | run: pipx install poetry 29 | - name: Set up Python 30 | uses: actions/setup-python@v6 31 | with: 32 | python-version: ${{ matrix.python-version }} 33 | cache: "poetry" 34 | - name: Install dependencies and library 35 | run: poetry install 36 | # We ignore the following rules for now: 37 | # E721 (https://docs.astral.sh/ruff/rules/type-comparison) 38 | # F541 (https://docs.astral.sh/ruff/rules/f-string-missing-placeholders) 39 | - name: Check linting 40 | run: poetry run ruff check . --ignore E721 --ignore F541 41 | actionlint: 42 | name: Github Actions lint 43 | runs-on: ubuntu-latest 44 | steps: 45 | - uses: actions/checkout@v6 46 | - name: Check workflow files 47 | uses: docker://rhysd/actionlint:latest 48 | -------------------------------------------------------------------------------- /scaleway-core/scaleway_core/bridge/__init__.py: -------------------------------------------------------------------------------- 1 | from .money import Money 2 | from .money import unmarshal_Money 3 | from .money import marshal_Money 4 | 5 | from .region import Region 6 | from .region import ALL_REGIONS 7 | from .zone import Zone 8 | from .zone import ALL_ZONES 9 | 10 | from .scwfile import ScwFile 11 | from .scwfile import unmarshal_ScwFile 12 | from .scwfile import marshal_ScwFile 13 | 14 | from .serviceinfo import ServiceInfo 15 | from .serviceinfo import unmarshal_ServiceInfo 16 | from .serviceinfo import marshal_ServiceInfo 17 | 18 | from .timeseries import TimeSeriesPoint 19 | from .timeseries import TimeSeries 20 | from .timeseries import unmarshal_TimeSeries 21 | from .timeseries import marshal_TimeSeries 22 | from .timeseries import unmarshal_TimeSeriesPoint 23 | from .timeseries import marshal_TimeSeriesPoint 24 | 25 | from .decimal import unmarshal_Decimal 26 | from .decimal import marshal_Decimal 27 | 28 | __all__ = [ 29 | "ALL_REGIONS", 30 | "ALL_ZONES", 31 | "Money", 32 | "Region", 33 | "ScwFile", 34 | "ServiceInfo", 35 | "TimeSeries", 36 | "TimeSeriesPoint", 37 | "Zone", 38 | "marshal_Decimal", 39 | "marshal_Money", 40 | "marshal_ScwFile", 41 | "marshal_ServiceInfo", 42 | "marshal_TimeSeries", 43 | "marshal_TimeSeriesPoint", 44 | "unmarshal_Decimal", 45 | "unmarshal_Money", 46 | "unmarshal_ScwFile", 47 | "unmarshal_ServiceInfo", 48 | "unmarshal_TimeSeries", 49 | "unmarshal_TimeSeriesPoint", 50 | ] 51 | -------------------------------------------------------------------------------- /scaleway/scaleway/applesilicon/v1alpha1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | RunnerStatus, 6 | ServerPrivateNetworkServerStatus, 7 | ServerPrivateNetworkStatus, 8 | ServerStatus, 9 | ) 10 | 11 | RUNNER_TRANSIENT_STATUSES: list[RunnerStatus] = [ 12 | RunnerStatus.WAITING, 13 | ] 14 | """ 15 | Lists transient statutes of the enum :class:`RunnerStatus `. 16 | """ 17 | SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES: list[ 18 | ServerPrivateNetworkServerStatus 19 | ] = [ 20 | ServerPrivateNetworkServerStatus.ATTACHING, 21 | ServerPrivateNetworkServerStatus.DETACHING, 22 | ] 23 | """ 24 | Lists transient statutes of the enum :class:`ServerPrivateNetworkServerStatus `. 25 | """ 26 | SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES: list[ServerPrivateNetworkStatus] = [ 27 | ServerPrivateNetworkStatus.VPC_UPDATING, 28 | ] 29 | """ 30 | Lists transient statutes of the enum :class:`ServerPrivateNetworkStatus `. 31 | """ 32 | SERVER_TRANSIENT_STATUSES: list[ServerStatus] = [ 33 | ServerStatus.STARTING, 34 | ServerStatus.REBOOTING, 35 | ServerStatus.UPDATING, 36 | ServerStatus.LOCKING, 37 | ServerStatus.UNLOCKING, 38 | ServerStatus.REINSTALLING, 39 | ServerStatus.BUSY, 40 | ] 41 | """ 42 | Lists transient statutes of the enum :class:`ServerStatus `. 43 | """ 44 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/applesilicon/v1alpha1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | RunnerStatus, 6 | ServerPrivateNetworkServerStatus, 7 | ServerPrivateNetworkStatus, 8 | ServerStatus, 9 | ) 10 | 11 | RUNNER_TRANSIENT_STATUSES: list[RunnerStatus] = [ 12 | RunnerStatus.WAITING, 13 | ] 14 | """ 15 | Lists transient statutes of the enum :class:`RunnerStatus `. 16 | """ 17 | SERVER_PRIVATE_NETWORK_SERVER_TRANSIENT_STATUSES: list[ 18 | ServerPrivateNetworkServerStatus 19 | ] = [ 20 | ServerPrivateNetworkServerStatus.ATTACHING, 21 | ServerPrivateNetworkServerStatus.DETACHING, 22 | ] 23 | """ 24 | Lists transient statutes of the enum :class:`ServerPrivateNetworkServerStatus `. 25 | """ 26 | SERVER_PRIVATE_NETWORK_TRANSIENT_STATUSES: list[ServerPrivateNetworkStatus] = [ 27 | ServerPrivateNetworkStatus.VPC_UPDATING, 28 | ] 29 | """ 30 | Lists transient statutes of the enum :class:`ServerPrivateNetworkStatus `. 31 | """ 32 | SERVER_TRANSIENT_STATUSES: list[ServerStatus] = [ 33 | ServerStatus.STARTING, 34 | ServerStatus.REBOOTING, 35 | ServerStatus.UPDATING, 36 | ServerStatus.LOCKING, 37 | ServerStatus.UNLOCKING, 38 | ServerStatus.REINSTALLING, 39 | ServerStatus.BUSY, 40 | ] 41 | """ 42 | Lists transient statutes of the enum :class:`ServerStatus `. 43 | """ 44 | -------------------------------------------------------------------------------- /scaleway/scaleway/instance/v1/tests/cassettes/test_set_and_get_server_user_data.cassette.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: this-is-a-test 4 | headers: 5 | Content-Length: 6 | - '14' 7 | user-agent: 8 | - scaleway-sdk-python/2.0.0 9 | method: PATCH 10 | uri: https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/66a3b25b-4518-43c3-9e61-33b82873d617/user_data/first%20key 11 | response: 12 | body: 13 | string: '' 14 | headers: 15 | date: 16 | - Tue, 16 Sep 2025 17:38:32 GMT 17 | server: 18 | - Scaleway API Gateway (fr-par-2;edge01) 19 | x-request-id: 20 | - 0ed3c2da-9914-462b-b123-f0bd05e159e2 21 | status: 22 | code: 204 23 | message: No Content 24 | - request: 25 | body: '{"server_id": "66a3b25b-4518-43c3-9e61-33b82873d617", "key": "first key"}' 26 | headers: 27 | Content-Length: 28 | - '73' 29 | user-agent: 30 | - scaleway-sdk-python/2.0.0 31 | method: GET 32 | uri: https://api.scaleway.com/instance/v1/zones/fr-par-1/servers/66a3b25b-4518-43c3-9e61-33b82873d617/user_data/first%20key 33 | response: 34 | body: 35 | string: this-is-a-test 36 | headers: 37 | content-length: 38 | - '14' 39 | date: 40 | - Tue, 16 Sep 2025 17:38:33 GMT 41 | server: 42 | - Scaleway API Gateway (fr-par-2;edge02) 43 | x-request-id: 44 | - 553413c2-2def-401d-be92-3c7e7476d070 45 | status: 46 | code: 200 47 | message: OK 48 | version: 1 49 | -------------------------------------------------------------------------------- /.github/workflows/docs.yml: -------------------------------------------------------------------------------- 1 | name: Generate documentation 2 | permissions: 3 | contents: read 4 | 5 | on: 6 | push: 7 | branches: 8 | - main 9 | workflow_dispatch: 10 | 11 | jobs: 12 | docs: 13 | runs-on: ubuntu-latest 14 | defaults: 15 | run: 16 | working-directory: ./docs 17 | steps: 18 | - uses: actions/checkout@v6 19 | - name: Install poetry 20 | run: pipx install poetry 21 | - name: Set up Python 22 | uses: actions/setup-python@v6 23 | with: 24 | python-version: "3.13" 25 | cache: 'poetry' 26 | - name: Set up cache 27 | uses: actions/cache@v4 28 | with: 29 | path: ./source 30 | key: 'sphinx-source-cache' 31 | - name: Install dependencies and library 32 | run: poetry install --no-root 33 | - name: Generate documentation sources 34 | run: | 35 | poetry run sphinx-apidoc -f -o ./source ../scaleway-core 36 | poetry run sphinx-apidoc -f -o ./source ../scaleway 37 | poetry run sphinx-apidoc -f -o ./source ../scaleway-async 38 | - name: Generate documentation 39 | run: poetry run sphinx-build -j auto -b html ./ ./_build 40 | - name: Deploy to GitHub Pages 41 | uses: peaceiris/actions-gh-pages@v4 42 | if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} 43 | with: 44 | publish_branch: docs 45 | github_token: ${{ secrets.GITHUB_TOKEN }} 46 | publish_dir: ./docs/_build 47 | force_orphan: true 48 | -------------------------------------------------------------------------------- /scaleway/scaleway/billing/v2alpha1/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | from .types import DiscountDiscountMode 4 | from .types import DiscountFilterType 5 | from .types import DownloadInvoiceRequestFileType 6 | from .types import InvoiceType 7 | from .types import ListDiscountsRequestOrderBy 8 | from .types import ListInvoicesRequestOrderBy 9 | from .types import DiscountCoupon 10 | from .types import DiscountFilter 11 | from .types import GetConsumptionResponseConsumption 12 | from .types import Discount 13 | from .types import Invoice 14 | from .types import DownloadInvoiceRequest 15 | from .types import GetConsumptionRequest 16 | from .types import GetConsumptionResponse 17 | from .types import ListDiscountsRequest 18 | from .types import ListDiscountsResponse 19 | from .types import ListInvoicesRequest 20 | from .types import ListInvoicesResponse 21 | from .api import BillingV2Alpha1API 22 | 23 | __all__ = [ 24 | "DiscountDiscountMode", 25 | "DiscountFilterType", 26 | "DownloadInvoiceRequestFileType", 27 | "InvoiceType", 28 | "ListDiscountsRequestOrderBy", 29 | "ListInvoicesRequestOrderBy", 30 | "DiscountCoupon", 31 | "DiscountFilter", 32 | "GetConsumptionResponseConsumption", 33 | "Discount", 34 | "Invoice", 35 | "DownloadInvoiceRequest", 36 | "GetConsumptionRequest", 37 | "GetConsumptionResponse", 38 | "ListDiscountsRequest", 39 | "ListDiscountsResponse", 40 | "ListInvoicesRequest", 41 | "ListInvoicesResponse", 42 | "BillingV2Alpha1API", 43 | ] 44 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/billing/v2alpha1/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | from .types import DiscountDiscountMode 4 | from .types import DiscountFilterType 5 | from .types import DownloadInvoiceRequestFileType 6 | from .types import InvoiceType 7 | from .types import ListDiscountsRequestOrderBy 8 | from .types import ListInvoicesRequestOrderBy 9 | from .types import DiscountCoupon 10 | from .types import DiscountFilter 11 | from .types import GetConsumptionResponseConsumption 12 | from .types import Discount 13 | from .types import Invoice 14 | from .types import DownloadInvoiceRequest 15 | from .types import GetConsumptionRequest 16 | from .types import GetConsumptionResponse 17 | from .types import ListDiscountsRequest 18 | from .types import ListDiscountsResponse 19 | from .types import ListInvoicesRequest 20 | from .types import ListInvoicesResponse 21 | from .api import BillingV2Alpha1API 22 | 23 | __all__ = [ 24 | "DiscountDiscountMode", 25 | "DiscountFilterType", 26 | "DownloadInvoiceRequestFileType", 27 | "InvoiceType", 28 | "ListDiscountsRequestOrderBy", 29 | "ListInvoicesRequestOrderBy", 30 | "DiscountCoupon", 31 | "DiscountFilter", 32 | "GetConsumptionResponseConsumption", 33 | "Discount", 34 | "Invoice", 35 | "DownloadInvoiceRequest", 36 | "GetConsumptionRequest", 37 | "GetConsumptionResponse", 38 | "ListDiscountsRequest", 39 | "ListDiscountsResponse", 40 | "ListInvoicesRequest", 41 | "ListInvoicesResponse", 42 | "BillingV2Alpha1API", 43 | ] 44 | -------------------------------------------------------------------------------- /scaleway-core/tests/test_profile_env.py: -------------------------------------------------------------------------------- 1 | import logging 2 | import os 3 | import sys 4 | import unittest 5 | import uuid 6 | from unittest import mock 7 | 8 | import utils 9 | from scaleway_core.profile import Profile 10 | 11 | logger = logging.getLogger() 12 | logger.level = logging.DEBUG 13 | stream_handler = logging.StreamHandler(sys.stdout) 14 | logger.addHandler(stream_handler) 15 | 16 | 17 | class TestProfileEnv(unittest.TestCase): 18 | def setUp(self) -> None: 19 | self.profile_config = Profile( 20 | access_key=utils.random_access_key(), 21 | secret_key=str(uuid.uuid4()), 22 | default_organization_id=str(uuid.uuid4()), 23 | default_project_id=str(uuid.uuid4()), 24 | default_region="fr-par", 25 | default_zone="fr-par-1", 26 | api_url="https://example.com", 27 | ) 28 | 29 | def test_load_profile_from_env(self) -> None: 30 | with mock.patch.dict( 31 | os.environ, 32 | { 33 | "SCW_ACCESS_KEY": self.profile_config.access_key, 34 | "SCW_SECRET_KEY": self.profile_config.secret_key, 35 | "SCW_DEFAULT_ORGANIZATION_ID": self.profile_config.default_organization_id, 36 | "SCW_DEFAULT_PROJECT_ID": self.profile_config.default_project_id, 37 | "SCW_DEFAULT_REGION": self.profile_config.default_region, 38 | "SCW_DEFAULT_ZONE": self.profile_config.default_zone, 39 | "SCW_API_URL": self.profile_config.api_url, 40 | }, 41 | ): 42 | profile = Profile.from_env() 43 | self.assertEqual(profile, self.profile_config) 44 | -------------------------------------------------------------------------------- /scaleway/scaleway/marketplace/v2/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | from .types import ListImagesRequestOrderBy 4 | from .types import ListLocalImagesRequestOrderBy 5 | from .types import ListVersionsRequestOrderBy 6 | from .types import LocalImageType 7 | from .types import Category 8 | from .types import Image 9 | from .types import LocalImage 10 | from .types import Version 11 | from .types import GetCategoryRequest 12 | from .types import GetImageRequest 13 | from .types import GetLocalImageRequest 14 | from .types import GetVersionRequest 15 | from .types import ListCategoriesRequest 16 | from .types import ListCategoriesResponse 17 | from .types import ListImagesRequest 18 | from .types import ListImagesResponse 19 | from .types import ListLocalImagesRequest 20 | from .types import ListLocalImagesResponse 21 | from .types import ListVersionsRequest 22 | from .types import ListVersionsResponse 23 | from .api import MarketplaceV2API 24 | 25 | __all__ = [ 26 | "ListImagesRequestOrderBy", 27 | "ListLocalImagesRequestOrderBy", 28 | "ListVersionsRequestOrderBy", 29 | "LocalImageType", 30 | "Category", 31 | "Image", 32 | "LocalImage", 33 | "Version", 34 | "GetCategoryRequest", 35 | "GetImageRequest", 36 | "GetLocalImageRequest", 37 | "GetVersionRequest", 38 | "ListCategoriesRequest", 39 | "ListCategoriesResponse", 40 | "ListImagesRequest", 41 | "ListImagesResponse", 42 | "ListLocalImagesRequest", 43 | "ListLocalImagesResponse", 44 | "ListVersionsRequest", 45 | "ListVersionsResponse", 46 | "MarketplaceV2API", 47 | ] 48 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/marketplace/v2/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | from .types import ListImagesRequestOrderBy 4 | from .types import ListLocalImagesRequestOrderBy 5 | from .types import ListVersionsRequestOrderBy 6 | from .types import LocalImageType 7 | from .types import Category 8 | from .types import Image 9 | from .types import LocalImage 10 | from .types import Version 11 | from .types import GetCategoryRequest 12 | from .types import GetImageRequest 13 | from .types import GetLocalImageRequest 14 | from .types import GetVersionRequest 15 | from .types import ListCategoriesRequest 16 | from .types import ListCategoriesResponse 17 | from .types import ListImagesRequest 18 | from .types import ListImagesResponse 19 | from .types import ListLocalImagesRequest 20 | from .types import ListLocalImagesResponse 21 | from .types import ListVersionsRequest 22 | from .types import ListVersionsResponse 23 | from .api import MarketplaceV2API 24 | 25 | __all__ = [ 26 | "ListImagesRequestOrderBy", 27 | "ListLocalImagesRequestOrderBy", 28 | "ListVersionsRequestOrderBy", 29 | "LocalImageType", 30 | "Category", 31 | "Image", 32 | "LocalImage", 33 | "Version", 34 | "GetCategoryRequest", 35 | "GetImageRequest", 36 | "GetLocalImageRequest", 37 | "GetVersionRequest", 38 | "ListCategoriesRequest", 39 | "ListCategoriesResponse", 40 | "ListImagesRequest", 41 | "ListImagesResponse", 42 | "ListLocalImagesRequest", 43 | "ListLocalImagesResponse", 44 | "ListVersionsRequest", 45 | "ListVersionsResponse", 46 | "MarketplaceV2API", 47 | ] 48 | -------------------------------------------------------------------------------- /scaleway-core/scaleway_core/bridge/serviceinfo.py: -------------------------------------------------------------------------------- 1 | from dataclasses import dataclass 2 | from typing import Any, Dict, Optional 3 | 4 | from scaleway_core.profile import ProfileDefaults 5 | 6 | 7 | @dataclass 8 | class ServiceInfo: 9 | """ 10 | Represents API metadata. 11 | 12 | These metadata are only here for debugging. Do not rely on these values. 13 | """ 14 | 15 | name: str 16 | """ 17 | Name of the API 18 | """ 19 | 20 | description: str 21 | """ 22 | Human readable description for the API. 23 | """ 24 | 25 | version: str 26 | """ 27 | Version of the API. 28 | """ 29 | 30 | documentation_url: Optional[str] = None 31 | """ 32 | Web url where the documentation of the API can be found. 33 | """ 34 | 35 | 36 | def unmarshal_ServiceInfo(data: Any) -> ServiceInfo: 37 | """ 38 | Unmarshals a ServiceInfo object from a dict. 39 | """ 40 | if not isinstance(data, dict): 41 | raise TypeError( 42 | "Unmarshalling the type 'ServiceInfo' failed as data isn't a dictionary." 43 | ) 44 | 45 | return ServiceInfo( 46 | name=data["name"], 47 | description=data["description"], 48 | version=data["version"], 49 | documentation_url=data.get("documentation_url", None), 50 | ) 51 | 52 | 53 | def marshal_ServiceInfo( 54 | obj: ServiceInfo, _defaults: ProfileDefaults | None 55 | ) -> Dict[str, Any]: 56 | """ 57 | Marshals a ServiceInfo object into a dict. 58 | """ 59 | return { 60 | "name": obj.name, 61 | "description": obj.description, 62 | "version": obj.version, 63 | "documentation_url": obj.documentation_url, 64 | } 65 | -------------------------------------------------------------------------------- /scaleway/scaleway/serverless_sqldb/v1alpha1/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | from .types import DatabaseBackupStatus 4 | from .types import DatabaseStatus 5 | from .content import DATABASE_TRANSIENT_STATUSES 6 | from .types import ListDatabaseBackupsRequestOrderBy 7 | from .types import ListDatabasesRequestOrderBy 8 | from .types import DatabaseBackup 9 | from .types import Database 10 | from .types import CreateDatabaseRequest 11 | from .types import DeleteDatabaseRequest 12 | from .types import ExportDatabaseBackupRequest 13 | from .types import GetDatabaseBackupRequest 14 | from .types import GetDatabaseRequest 15 | from .types import ListDatabaseBackupsRequest 16 | from .types import ListDatabaseBackupsResponse 17 | from .types import ListDatabasesRequest 18 | from .types import ListDatabasesResponse 19 | from .types import RestoreDatabaseFromBackupRequest 20 | from .types import UpdateDatabaseRequest 21 | from .api import ServerlessSqldbV1Alpha1API 22 | 23 | __all__ = [ 24 | "DatabaseBackupStatus", 25 | "DatabaseStatus", 26 | "DATABASE_TRANSIENT_STATUSES", 27 | "ListDatabaseBackupsRequestOrderBy", 28 | "ListDatabasesRequestOrderBy", 29 | "DatabaseBackup", 30 | "Database", 31 | "CreateDatabaseRequest", 32 | "DeleteDatabaseRequest", 33 | "ExportDatabaseBackupRequest", 34 | "GetDatabaseBackupRequest", 35 | "GetDatabaseRequest", 36 | "ListDatabaseBackupsRequest", 37 | "ListDatabaseBackupsResponse", 38 | "ListDatabasesRequest", 39 | "ListDatabasesResponse", 40 | "RestoreDatabaseFromBackupRequest", 41 | "UpdateDatabaseRequest", 42 | "ServerlessSqldbV1Alpha1API", 43 | ] 44 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/serverless_sqldb/v1alpha1/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | from .types import DatabaseBackupStatus 4 | from .types import DatabaseStatus 5 | from .content import DATABASE_TRANSIENT_STATUSES 6 | from .types import ListDatabaseBackupsRequestOrderBy 7 | from .types import ListDatabasesRequestOrderBy 8 | from .types import DatabaseBackup 9 | from .types import Database 10 | from .types import CreateDatabaseRequest 11 | from .types import DeleteDatabaseRequest 12 | from .types import ExportDatabaseBackupRequest 13 | from .types import GetDatabaseBackupRequest 14 | from .types import GetDatabaseRequest 15 | from .types import ListDatabaseBackupsRequest 16 | from .types import ListDatabaseBackupsResponse 17 | from .types import ListDatabasesRequest 18 | from .types import ListDatabasesResponse 19 | from .types import RestoreDatabaseFromBackupRequest 20 | from .types import UpdateDatabaseRequest 21 | from .api import ServerlessSqldbV1Alpha1API 22 | 23 | __all__ = [ 24 | "DatabaseBackupStatus", 25 | "DatabaseStatus", 26 | "DATABASE_TRANSIENT_STATUSES", 27 | "ListDatabaseBackupsRequestOrderBy", 28 | "ListDatabasesRequestOrderBy", 29 | "DatabaseBackup", 30 | "Database", 31 | "CreateDatabaseRequest", 32 | "DeleteDatabaseRequest", 33 | "ExportDatabaseBackupRequest", 34 | "GetDatabaseBackupRequest", 35 | "GetDatabaseRequest", 36 | "ListDatabaseBackupsRequest", 37 | "ListDatabaseBackupsResponse", 38 | "ListDatabasesRequest", 39 | "ListDatabasesResponse", 40 | "RestoreDatabaseFromBackupRequest", 41 | "UpdateDatabaseRequest", 42 | "ServerlessSqldbV1Alpha1API", 43 | ] 44 | -------------------------------------------------------------------------------- /scaleway/scaleway/mongodb/v1/tests/test_custom_api.py: -------------------------------------------------------------------------------- 1 | import os 2 | from datetime import datetime, timedelta, timezone 3 | from pathlib import Path 4 | 5 | import pytest 6 | 7 | from vcr_config import scw_vcr 8 | from vcr_config import PYTHON_UPDATE_CASSETTE 9 | from tests.utils import initialize_client_test 10 | from scaleway.mongodb.v1.custom_api import MongodbUtilsV1API 11 | 12 | 13 | # mypy: ignore-errors 14 | 15 | 16 | @scw_vcr.use_cassette 17 | def test_create_snapshot_with_naive_expires_at_vcr() -> None: 18 | cassette = ( 19 | Path(__file__).with_name("cassettes") 20 | / "test_create_snapshot_with_naive_expires_at_vcr.cassette.yaml" 21 | ) 22 | if not cassette.exists() and not os.getenv("PYTHON_UPDATE_CASSETTE"): 23 | pytest.skip( 24 | "cassette not recorded yet; set PYTHON_UPDATE_CASSETTE=true to record" 25 | ) 26 | client = initialize_client_test() 27 | api = MongodbUtilsV1API(client, bypass_validation=True) 28 | 29 | # During recording, require a real instance_id via env; during replay, use the fixed value matching the cassette 30 | if PYTHON_UPDATE_CASSETTE: 31 | instance_id = os.getenv("SCW_TEST_MONGODB_INSTANCE_ID") 32 | if not instance_id: 33 | pytest.skip("SCW_TEST_MONGODB_INSTANCE_ID not set while recording") 34 | else: 35 | instance_id = "00000000-0000-0000-0000-000000000000" 36 | 37 | # Naive datetime should be handled as UTC by the utils API 38 | naive_dt = datetime.now(timezone.utc).replace(tzinfo=None) + timedelta(days=1) 39 | 40 | snapshot = api.create_snapshot( 41 | instance_id=instance_id, 42 | name="sdk-python-test-snapshot", 43 | expires_at=naive_dt, 44 | ) 45 | 46 | assert snapshot is not None 47 | -------------------------------------------------------------------------------- /scaleway/scaleway/function/v1beta1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | CronStatus, 6 | DomainStatus, 7 | FunctionStatus, 8 | NamespaceStatus, 9 | TokenStatus, 10 | TriggerStatus, 11 | ) 12 | 13 | CRON_TRANSIENT_STATUSES: list[CronStatus] = [ 14 | CronStatus.DELETING, 15 | CronStatus.CREATING, 16 | CronStatus.PENDING, 17 | ] 18 | """ 19 | Lists transient statutes of the enum :class:`CronStatus `. 20 | """ 21 | DOMAIN_TRANSIENT_STATUSES: list[DomainStatus] = [ 22 | DomainStatus.DELETING, 23 | DomainStatus.CREATING, 24 | DomainStatus.PENDING, 25 | ] 26 | """ 27 | Lists transient statutes of the enum :class:`DomainStatus `. 28 | """ 29 | FUNCTION_TRANSIENT_STATUSES: list[FunctionStatus] = [ 30 | FunctionStatus.DELETING, 31 | FunctionStatus.CREATING, 32 | FunctionStatus.PENDING, 33 | ] 34 | """ 35 | Lists transient statutes of the enum :class:`FunctionStatus `. 36 | """ 37 | NAMESPACE_TRANSIENT_STATUSES: list[NamespaceStatus] = [ 38 | NamespaceStatus.DELETING, 39 | NamespaceStatus.CREATING, 40 | NamespaceStatus.PENDING, 41 | ] 42 | """ 43 | Lists transient statutes of the enum :class:`NamespaceStatus `. 44 | """ 45 | TOKEN_TRANSIENT_STATUSES: list[TokenStatus] = [ 46 | TokenStatus.DELETING, 47 | TokenStatus.CREATING, 48 | ] 49 | """ 50 | Lists transient statutes of the enum :class:`TokenStatus `. 51 | """ 52 | TRIGGER_TRANSIENT_STATUSES: list[TriggerStatus] = [ 53 | TriggerStatus.DELETING, 54 | TriggerStatus.CREATING, 55 | TriggerStatus.PENDING, 56 | ] 57 | """ 58 | Lists transient statutes of the enum :class:`TriggerStatus `. 59 | """ 60 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/function/v1beta1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | CronStatus, 6 | DomainStatus, 7 | FunctionStatus, 8 | NamespaceStatus, 9 | TokenStatus, 10 | TriggerStatus, 11 | ) 12 | 13 | CRON_TRANSIENT_STATUSES: list[CronStatus] = [ 14 | CronStatus.DELETING, 15 | CronStatus.CREATING, 16 | CronStatus.PENDING, 17 | ] 18 | """ 19 | Lists transient statutes of the enum :class:`CronStatus `. 20 | """ 21 | DOMAIN_TRANSIENT_STATUSES: list[DomainStatus] = [ 22 | DomainStatus.DELETING, 23 | DomainStatus.CREATING, 24 | DomainStatus.PENDING, 25 | ] 26 | """ 27 | Lists transient statutes of the enum :class:`DomainStatus `. 28 | """ 29 | FUNCTION_TRANSIENT_STATUSES: list[FunctionStatus] = [ 30 | FunctionStatus.DELETING, 31 | FunctionStatus.CREATING, 32 | FunctionStatus.PENDING, 33 | ] 34 | """ 35 | Lists transient statutes of the enum :class:`FunctionStatus `. 36 | """ 37 | NAMESPACE_TRANSIENT_STATUSES: list[NamespaceStatus] = [ 38 | NamespaceStatus.DELETING, 39 | NamespaceStatus.CREATING, 40 | NamespaceStatus.PENDING, 41 | ] 42 | """ 43 | Lists transient statutes of the enum :class:`NamespaceStatus `. 44 | """ 45 | TOKEN_TRANSIENT_STATUSES: list[TokenStatus] = [ 46 | TokenStatus.DELETING, 47 | TokenStatus.CREATING, 48 | ] 49 | """ 50 | Lists transient statutes of the enum :class:`TokenStatus `. 51 | """ 52 | TRIGGER_TRANSIENT_STATUSES: list[TriggerStatus] = [ 53 | TriggerStatus.DELETING, 54 | TriggerStatus.CREATING, 55 | TriggerStatus.PENDING, 56 | ] 57 | """ 58 | Lists transient statutes of the enum :class:`TriggerStatus `. 59 | """ 60 | -------------------------------------------------------------------------------- /scaleway/scaleway/container/v1beta1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | ContainerStatus, 6 | CronStatus, 7 | DomainStatus, 8 | NamespaceStatus, 9 | TokenStatus, 10 | TriggerStatus, 11 | ) 12 | 13 | CONTAINER_TRANSIENT_STATUSES: list[ContainerStatus] = [ 14 | ContainerStatus.DELETING, 15 | ContainerStatus.CREATING, 16 | ContainerStatus.PENDING, 17 | ] 18 | """ 19 | Lists transient statutes of the enum :class:`ContainerStatus `. 20 | """ 21 | CRON_TRANSIENT_STATUSES: list[CronStatus] = [ 22 | CronStatus.DELETING, 23 | CronStatus.CREATING, 24 | CronStatus.PENDING, 25 | ] 26 | """ 27 | Lists transient statutes of the enum :class:`CronStatus `. 28 | """ 29 | DOMAIN_TRANSIENT_STATUSES: list[DomainStatus] = [ 30 | DomainStatus.DELETING, 31 | DomainStatus.CREATING, 32 | DomainStatus.PENDING, 33 | ] 34 | """ 35 | Lists transient statutes of the enum :class:`DomainStatus `. 36 | """ 37 | NAMESPACE_TRANSIENT_STATUSES: list[NamespaceStatus] = [ 38 | NamespaceStatus.DELETING, 39 | NamespaceStatus.CREATING, 40 | NamespaceStatus.PENDING, 41 | ] 42 | """ 43 | Lists transient statutes of the enum :class:`NamespaceStatus `. 44 | """ 45 | TOKEN_TRANSIENT_STATUSES: list[TokenStatus] = [ 46 | TokenStatus.DELETING, 47 | TokenStatus.CREATING, 48 | ] 49 | """ 50 | Lists transient statutes of the enum :class:`TokenStatus `. 51 | """ 52 | TRIGGER_TRANSIENT_STATUSES: list[TriggerStatus] = [ 53 | TriggerStatus.DELETING, 54 | TriggerStatus.CREATING, 55 | TriggerStatus.PENDING, 56 | ] 57 | """ 58 | Lists transient statutes of the enum :class:`TriggerStatus `. 59 | """ 60 | -------------------------------------------------------------------------------- /scaleway-core/scaleway_core/bridge/money.py: -------------------------------------------------------------------------------- 1 | from dataclasses import dataclass 2 | from typing import Any, Dict 3 | 4 | from scaleway_core.profile import ProfileDefaults 5 | 6 | 7 | @dataclass 8 | class Money: 9 | """ 10 | Represents an amount of money with its currency type. 11 | """ 12 | 13 | currency_code: str 14 | """ 15 | 3-letter currency code defined in ISO 4217. 16 | """ 17 | 18 | units: float 19 | """ 20 | Whole units of the amount. 21 | 22 | For example if `currency_code` is `"USD"`, then 1 unit is one US dollar. 23 | """ 24 | 25 | nanos: int 26 | """ 27 | Number of nano (10^-9) units of the amount. 28 | 29 | The value must be between -999,999,999 and +999,999,999 inclusive. 30 | If `units` is positive, `nanos` must be positive or zero. 31 | If `units` is zero, `nanos` can be positive, zero, or negative. 32 | If `units` is negative, `nanos` must be negative or zero. 33 | For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000. 34 | """ 35 | 36 | 37 | def unmarshal_Money(data: Any) -> Money: 38 | """ 39 | Unmarshal an instance of Money from the given data. 40 | """ 41 | if not isinstance(data, dict): 42 | raise TypeError( 43 | "Unmarshalling the type 'Money' failed as data isn't a dictionary." 44 | ) 45 | 46 | return Money( 47 | currency_code=data["currency_code"], 48 | units=data["units"], 49 | nanos=data["nanos"], 50 | ) 51 | 52 | 53 | def marshal_Money(data: Money, _defaults: ProfileDefaults | None) -> Dict[str, Any]: 54 | """ 55 | Marshal an instance of Money into a JSON compatible data structure. 56 | """ 57 | return { 58 | "currency_code": data.currency_code, 59 | "units": data.units, 60 | "nanos": data.nanos, 61 | } 62 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/container/v1beta1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | ContainerStatus, 6 | CronStatus, 7 | DomainStatus, 8 | NamespaceStatus, 9 | TokenStatus, 10 | TriggerStatus, 11 | ) 12 | 13 | CONTAINER_TRANSIENT_STATUSES: list[ContainerStatus] = [ 14 | ContainerStatus.DELETING, 15 | ContainerStatus.CREATING, 16 | ContainerStatus.PENDING, 17 | ] 18 | """ 19 | Lists transient statutes of the enum :class:`ContainerStatus `. 20 | """ 21 | CRON_TRANSIENT_STATUSES: list[CronStatus] = [ 22 | CronStatus.DELETING, 23 | CronStatus.CREATING, 24 | CronStatus.PENDING, 25 | ] 26 | """ 27 | Lists transient statutes of the enum :class:`CronStatus `. 28 | """ 29 | DOMAIN_TRANSIENT_STATUSES: list[DomainStatus] = [ 30 | DomainStatus.DELETING, 31 | DomainStatus.CREATING, 32 | DomainStatus.PENDING, 33 | ] 34 | """ 35 | Lists transient statutes of the enum :class:`DomainStatus `. 36 | """ 37 | NAMESPACE_TRANSIENT_STATUSES: list[NamespaceStatus] = [ 38 | NamespaceStatus.DELETING, 39 | NamespaceStatus.CREATING, 40 | NamespaceStatus.PENDING, 41 | ] 42 | """ 43 | Lists transient statutes of the enum :class:`NamespaceStatus `. 44 | """ 45 | TOKEN_TRANSIENT_STATUSES: list[TokenStatus] = [ 46 | TokenStatus.DELETING, 47 | TokenStatus.CREATING, 48 | ] 49 | """ 50 | Lists transient statutes of the enum :class:`TokenStatus `. 51 | """ 52 | TRIGGER_TRANSIENT_STATUSES: list[TriggerStatus] = [ 53 | TriggerStatus.DELETING, 54 | TriggerStatus.CREATING, 55 | TriggerStatus.PENDING, 56 | ] 57 | """ 58 | Lists transient statutes of the enum :class:`TriggerStatus `. 59 | """ 60 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | WORKDIR = $(shell pwd) 2 | LIBRARIES = scaleway-core scaleway-async scaleway 3 | 4 | build: 5 | for lib in $(LIBRARIES); do \ 6 | cd ${WORKDIR}/$$lib && \ 7 | poetry build; \ 8 | done 9 | 10 | install-dependencies: 11 | for lib in $(LIBRARIES); do \ 12 | cd ${WORKDIR}/$$lib && \ 13 | poetry install --no-root; \ 14 | done 15 | 16 | install-only-root: 17 | for lib in $(LIBRARIES); do \ 18 | cd ${WORKDIR}/$$lib && \ 19 | poetry install --only-root; \ 20 | done 21 | 22 | format: 23 | for lib in $(LIBRARIES); do \ 24 | cd ${WORKDIR}/$$lib && \ 25 | poetry run ruff --version && \ 26 | poetry run ruff format; \ 27 | done 28 | 29 | format-check: 30 | for lib in $(LIBRARIES); do \ 31 | cd ${WORKDIR}/$$lib && \ 32 | poetry run ruff --version && \ 33 | poetry run ruff format --check; \ 34 | done 35 | 36 | typing: 37 | for lib in $(LIBRARIES); do \ 38 | cd ${WORKDIR}/$$lib && \ 39 | poetry run mypy --version && \ 40 | poetry run mypy --install-types --non-interactive --strict $$(echo $$lib | tr "-" "_") && \ 41 | poetry run ty version && \ 42 | poetry run ty check && \ 43 | poetry run pyrefly --version && \ 44 | poetry run pyrefly check; \ 45 | done 46 | 47 | lint: 48 | for lib in $(LIBRARIES); do \ 49 | cd ${WORKDIR}/$$lib && \ 50 | poetry run ruff --version && \ 51 | poetry run ruff check . --ignore E721 --ignore F541; \ 52 | done 53 | 54 | test: 55 | for lib in $(LIBRARIES); do \ 56 | cd ${WORKDIR}/$$lib && \ 57 | poetry install && \ 58 | poetry run pytest -v; \ 59 | done 60 | 61 | update-goldens: 62 | PYTHON_UPDATE_CASSETTES=true $(MAKE) test 63 | 64 | publish: install-dependencies 65 | for lib in $(LIBRARIES); do \ 66 | cd ${WORKDIR}/$$lib && \ 67 | poetry version "${PACKAGE_VERSION}" && \ 68 | poetry build && \ 69 | poetry publish --repository "${PYPI_REPOSITORY}" --no-interaction; \ 70 | done 71 | -------------------------------------------------------------------------------- /scaleway/scaleway/document_db/v1beta1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | from typing import List 4 | 5 | from .types import ( 6 | InstanceLogStatus, 7 | InstanceStatus, 8 | MaintenanceStatus, 9 | ReadReplicaStatus, 10 | SnapshotStatus, 11 | ) 12 | 13 | INSTANCE_LOG_TRANSIENT_STATUSES: List[InstanceLogStatus] = [ 14 | InstanceLogStatus.CREATING, 15 | ] 16 | """ 17 | Lists transient statutes of the enum :class:`InstanceLogStatus `. 18 | """ 19 | INSTANCE_TRANSIENT_STATUSES: List[InstanceStatus] = [ 20 | InstanceStatus.PROVISIONING, 21 | InstanceStatus.CONFIGURING, 22 | InstanceStatus.DELETING, 23 | InstanceStatus.AUTOHEALING, 24 | InstanceStatus.INITIALIZING, 25 | InstanceStatus.BACKUPING, 26 | InstanceStatus.SNAPSHOTTING, 27 | InstanceStatus.RESTARTING, 28 | ] 29 | """ 30 | Lists transient statutes of the enum :class:`InstanceStatus `. 31 | """ 32 | MAINTENANCE_TRANSIENT_STATUSES: List[MaintenanceStatus] = [ 33 | MaintenanceStatus.ONGOING, 34 | ] 35 | """ 36 | Lists transient statutes of the enum :class:`MaintenanceStatus `. 37 | """ 38 | READ_REPLICA_TRANSIENT_STATUSES: List[ReadReplicaStatus] = [ 39 | ReadReplicaStatus.PROVISIONING, 40 | ReadReplicaStatus.INITIALIZING, 41 | ReadReplicaStatus.DELETING, 42 | ReadReplicaStatus.CONFIGURING, 43 | ReadReplicaStatus.PROMOTING, 44 | ] 45 | """ 46 | Lists transient statutes of the enum :class:`ReadReplicaStatus `. 47 | """ 48 | SNAPSHOT_TRANSIENT_STATUSES: List[SnapshotStatus] = [ 49 | SnapshotStatus.CREATING, 50 | SnapshotStatus.RESTORING, 51 | SnapshotStatus.DELETING, 52 | ] 53 | """ 54 | Lists transient statutes of the enum :class:`SnapshotStatus `. 55 | """ 56 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/document_db/v1beta1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | from typing import List 4 | 5 | from .types import ( 6 | InstanceLogStatus, 7 | InstanceStatus, 8 | MaintenanceStatus, 9 | ReadReplicaStatus, 10 | SnapshotStatus, 11 | ) 12 | 13 | INSTANCE_LOG_TRANSIENT_STATUSES: List[InstanceLogStatus] = [ 14 | InstanceLogStatus.CREATING, 15 | ] 16 | """ 17 | Lists transient statutes of the enum :class:`InstanceLogStatus `. 18 | """ 19 | INSTANCE_TRANSIENT_STATUSES: List[InstanceStatus] = [ 20 | InstanceStatus.PROVISIONING, 21 | InstanceStatus.CONFIGURING, 22 | InstanceStatus.DELETING, 23 | InstanceStatus.AUTOHEALING, 24 | InstanceStatus.INITIALIZING, 25 | InstanceStatus.BACKUPING, 26 | InstanceStatus.SNAPSHOTTING, 27 | InstanceStatus.RESTARTING, 28 | ] 29 | """ 30 | Lists transient statutes of the enum :class:`InstanceStatus `. 31 | """ 32 | MAINTENANCE_TRANSIENT_STATUSES: List[MaintenanceStatus] = [ 33 | MaintenanceStatus.ONGOING, 34 | ] 35 | """ 36 | Lists transient statutes of the enum :class:`MaintenanceStatus `. 37 | """ 38 | READ_REPLICA_TRANSIENT_STATUSES: List[ReadReplicaStatus] = [ 39 | ReadReplicaStatus.PROVISIONING, 40 | ReadReplicaStatus.INITIALIZING, 41 | ReadReplicaStatus.DELETING, 42 | ReadReplicaStatus.CONFIGURING, 43 | ReadReplicaStatus.PROMOTING, 44 | ] 45 | """ 46 | Lists transient statutes of the enum :class:`ReadReplicaStatus `. 47 | """ 48 | SNAPSHOT_TRANSIENT_STATUSES: List[SnapshotStatus] = [ 49 | SnapshotStatus.CREATING, 50 | SnapshotStatus.RESTORING, 51 | SnapshotStatus.DELETING, 52 | ] 53 | """ 54 | Lists transient statutes of the enum :class:`SnapshotStatus `. 55 | """ 56 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 🐛 Bug Report 3 | about: Unexpected or broken behavior of SDK-python 🤔 4 | labels: bug 5 | --- 6 | 7 | 8 | 9 | ### Community Note 10 | 11 | * Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request 12 | * Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request 13 | * If you are interested in working on this issue or have submitted a pull request, please leave a comment 14 | 15 | 16 | 17 | ## Command attempted 18 | 19 | 20 | 21 | ```python 22 | from scaleway_core.client import Client 23 | from scaleway.instance.v1.types import BootType 24 | from scaleway.instance.v1.custom_api import InstanceUtilsV1API 25 | 26 | client = Client.from_config_file_and_env() 27 | instance_api = InstanceUtilsV1API(client) 28 | 29 | server = instance_api.create_server( 30 | commercial_type="DEV1-S", 31 | zone="fr-par-1", 32 | name="test-server", 33 | dynamic_ip_required=False, 34 | volumes={}, 35 | protected=False, 36 | boot_type=BootType.LOCAL, 37 | ) 38 | ``` 39 | ### Expected Behavior 40 | 41 | 42 | 43 | ### Actual Behavior 44 | 45 | 46 | 47 | ## More info 48 | 49 | SDK-Python version: 50 | 51 | Python version: 52 | 53 | OS version: 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /scaleway/scaleway/vpc/v2/tests/cassettes/vpc.cassette.yaml: -------------------------------------------------------------------------------- 1 | interactions: 2 | - request: 3 | body: '{"enable_routing": true, "name": "vpc-test-sdk-python-eager-swartz", "project_id": 4 | "11111111-1111-1111-1111-111111111111"}' 5 | headers: 6 | Content-Length: 7 | - '122' 8 | user-agent: 9 | - scaleway-sdk-python/2.0.0 10 | method: POST 11 | uri: https://api.scaleway.com/vpc/v2/regions/fr-par/vpcs 12 | response: 13 | body: 14 | string: '{"id": "64bd296a-08ae-472a-9868-13dc873fefe4", "name": "vpc-test-sdk-python-eager-swartz", 15 | "tags": [], "organization_id": "11111111-1111-1111-1111-111111111111", "created_at": 16 | "2025-09-02T07:49:03.264547Z", "updated_at": "2025-09-02T07:49:03.264547Z", 17 | "project_id": "11111111-1111-1111-1111-111111111111", "is_default": false, 18 | "private_network_count": 0, "routing_enabled": true, "custom_routes_propagation_enabled": 19 | true, "region": "fr-par"}' 20 | headers: 21 | content-length: 22 | - '419' 23 | date: 24 | - Tue, 02 Sep 2025 07:49:03 GMT 25 | server: 26 | - Scaleway API Gateway (fr-par-3;edge03) 27 | x-request-id: 28 | - 1086279a-6230-473f-9830-54d0097439fd 29 | status: 30 | code: 200 31 | message: OK 32 | - request: 33 | body: '{}' 34 | headers: 35 | Content-Length: 36 | - '2' 37 | user-agent: 38 | - scaleway-sdk-python/2.0.0 39 | method: DELETE 40 | uri: https://api.scaleway.com/vpc/v2/regions/fr-par/vpcs/64bd296a-08ae-472a-9868-13dc873fefe4 41 | response: 42 | body: 43 | string: '' 44 | headers: 45 | date: 46 | - Tue, 02 Sep 2025 07:49:13 GMT 47 | server: 48 | - Scaleway API Gateway (fr-par-3;edge02) 49 | x-request-id: 50 | - 9ed1fbbe-354f-4beb-a68a-cc227f96aee1 51 | status: 52 | code: 204 53 | message: No Content 54 | version: 1 55 | -------------------------------------------------------------------------------- /scaleway/scaleway/flexibleip/v1alpha1/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | from .types import FlexibleIPStatus 4 | from .content import FLEXIBLE_IP_TRANSIENT_STATUSES 5 | from .types import ListFlexibleIPsRequestOrderBy 6 | from .types import MACAddressStatus 7 | from .content import MAC_ADDRESS_TRANSIENT_STATUSES 8 | from .types import MACAddressType 9 | from .types import MACAddress 10 | from .types import FlexibleIP 11 | from .types import AttachFlexibleIPRequest 12 | from .types import AttachFlexibleIPsResponse 13 | from .types import CreateFlexibleIPRequest 14 | from .types import DeleteFlexibleIPRequest 15 | from .types import DeleteMACAddrRequest 16 | from .types import DetachFlexibleIPRequest 17 | from .types import DetachFlexibleIPsResponse 18 | from .types import DuplicateMACAddrRequest 19 | from .types import GenerateMACAddrRequest 20 | from .types import GetFlexibleIPRequest 21 | from .types import ListFlexibleIPsRequest 22 | from .types import ListFlexibleIPsResponse 23 | from .types import MoveMACAddrRequest 24 | from .types import UpdateFlexibleIPRequest 25 | from .api import FlexibleipV1Alpha1API 26 | 27 | __all__ = [ 28 | "FlexibleIPStatus", 29 | "FLEXIBLE_IP_TRANSIENT_STATUSES", 30 | "ListFlexibleIPsRequestOrderBy", 31 | "MACAddressStatus", 32 | "MAC_ADDRESS_TRANSIENT_STATUSES", 33 | "MACAddressType", 34 | "MACAddress", 35 | "FlexibleIP", 36 | "AttachFlexibleIPRequest", 37 | "AttachFlexibleIPsResponse", 38 | "CreateFlexibleIPRequest", 39 | "DeleteFlexibleIPRequest", 40 | "DeleteMACAddrRequest", 41 | "DetachFlexibleIPRequest", 42 | "DetachFlexibleIPsResponse", 43 | "DuplicateMACAddrRequest", 44 | "GenerateMACAddrRequest", 45 | "GetFlexibleIPRequest", 46 | "ListFlexibleIPsRequest", 47 | "ListFlexibleIPsResponse", 48 | "MoveMACAddrRequest", 49 | "UpdateFlexibleIPRequest", 50 | "FlexibleipV1Alpha1API", 51 | ] 52 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/flexibleip/v1alpha1/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | from .types import FlexibleIPStatus 4 | from .content import FLEXIBLE_IP_TRANSIENT_STATUSES 5 | from .types import ListFlexibleIPsRequestOrderBy 6 | from .types import MACAddressStatus 7 | from .content import MAC_ADDRESS_TRANSIENT_STATUSES 8 | from .types import MACAddressType 9 | from .types import MACAddress 10 | from .types import FlexibleIP 11 | from .types import AttachFlexibleIPRequest 12 | from .types import AttachFlexibleIPsResponse 13 | from .types import CreateFlexibleIPRequest 14 | from .types import DeleteFlexibleIPRequest 15 | from .types import DeleteMACAddrRequest 16 | from .types import DetachFlexibleIPRequest 17 | from .types import DetachFlexibleIPsResponse 18 | from .types import DuplicateMACAddrRequest 19 | from .types import GenerateMACAddrRequest 20 | from .types import GetFlexibleIPRequest 21 | from .types import ListFlexibleIPsRequest 22 | from .types import ListFlexibleIPsResponse 23 | from .types import MoveMACAddrRequest 24 | from .types import UpdateFlexibleIPRequest 25 | from .api import FlexibleipV1Alpha1API 26 | 27 | __all__ = [ 28 | "FlexibleIPStatus", 29 | "FLEXIBLE_IP_TRANSIENT_STATUSES", 30 | "ListFlexibleIPsRequestOrderBy", 31 | "MACAddressStatus", 32 | "MAC_ADDRESS_TRANSIENT_STATUSES", 33 | "MACAddressType", 34 | "MACAddress", 35 | "FlexibleIP", 36 | "AttachFlexibleIPRequest", 37 | "AttachFlexibleIPsResponse", 38 | "CreateFlexibleIPRequest", 39 | "DeleteFlexibleIPRequest", 40 | "DeleteMACAddrRequest", 41 | "DetachFlexibleIPRequest", 42 | "DetachFlexibleIPsResponse", 43 | "DuplicateMACAddrRequest", 44 | "GenerateMACAddrRequest", 45 | "GetFlexibleIPRequest", 46 | "ListFlexibleIPsRequest", 47 | "ListFlexibleIPsResponse", 48 | "MoveMACAddrRequest", 49 | "UpdateFlexibleIPRequest", 50 | "FlexibleipV1Alpha1API", 51 | ] 52 | -------------------------------------------------------------------------------- /scaleway/tests/utils.py: -------------------------------------------------------------------------------- 1 | import random 2 | import uuid 3 | from datetime import datetime, timezone 4 | from typing import Union 5 | 6 | from scaleway_core.client import Client 7 | from scaleway_core.profile import ProfileDefaults 8 | from vcr_config import REPLAY_CASSETTES 9 | 10 | system_random = random.SystemRandom() 11 | 12 | 13 | def random_name() -> str: 14 | return "test-{}".format(uuid.uuid4().hex) 15 | 16 | 17 | def random_access_key() -> str: 18 | return "SCW" + "".join( 19 | system_random.choices("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", k=16) 20 | ) 21 | 22 | 23 | def string_to_datetime(date: str) -> datetime: 24 | return datetime.strptime(date, "%Y-%m-%dT%H:%M:%SZ").astimezone(timezone.utc) 25 | 26 | 27 | def random_date(min: Union[str, datetime], max: Union[str, datetime]) -> datetime: 28 | min_time = min if isinstance(min, datetime) else string_to_datetime(min) 29 | max_time = max if isinstance(max, datetime) else string_to_datetime(max) 30 | 31 | return min_time + system_random.random() * (max_time - min_time) 32 | 33 | 34 | def datetime_to_string(date: datetime) -> str: 35 | return date.strftime("%Y-%m-%dT%H:%M:%SZ") 36 | 37 | 38 | def random_date_string(min: str, max: str) -> str: 39 | return datetime_to_string(random_date(min, max)) 40 | 41 | 42 | def random_profile_defaults() -> ProfileDefaults: 43 | return ProfileDefaults( 44 | default_organization_id=uuid.uuid4().hex, 45 | default_project_id=uuid.uuid4().hex, 46 | ) 47 | 48 | 49 | def initialize_client_test(): 50 | if REPLAY_CASSETTES: 51 | client = Client( 52 | access_key="SCWXXXXXXXXXXXXXXXXX", 53 | secret_key="11111111-1111-1111-1111-111111111111", 54 | default_project_id="11111111-1111-1111-1111-111111111111", 55 | default_organization_id="11111111-1111-1111-1111-111111111111", 56 | default_region="fr-par", 57 | default_zone="fr-par-1", 58 | ) 59 | else: 60 | client = Client.from_config_file_and_env() 61 | return client 62 | -------------------------------------------------------------------------------- /scaleway/scaleway/k8s/v1/tests/test_k8s_sk.py: -------------------------------------------------------------------------------- 1 | from typing import Any, Generator 2 | 3 | import pytest 4 | 5 | from scaleway.k8s.v1 import K8SV1API, CNI 6 | from scaleway.vpc.v2 import VpcV2API, PrivateNetwork 7 | from scaleway_core.api import ScalewayException 8 | from tests.utils import initialize_client_test 9 | from vcr_config import scw_vcr 10 | 11 | # mypy: ignore-errors 12 | 13 | 14 | @pytest.fixture(scope="module") 15 | @scw_vcr.use_cassette 16 | def k8s_api() -> K8SV1API: 17 | client = initialize_client_test() 18 | return K8SV1API(client, bypass_validation=True) 19 | 20 | 21 | @pytest.fixture(scope="module") 22 | @scw_vcr.use_cassette 23 | def private_network() -> Generator[PrivateNetwork, Any, None]: 24 | client = initialize_client_test() 25 | vpc_api = VpcV2API(client, bypass_validation=True) 26 | vpc = vpc_api.create_vpc(enable_routing=False) 27 | pn = vpc_api.create_private_network( 28 | vpc_id=vpc.id, default_route_propagation_enabled=True 29 | ) 30 | yield pn 31 | vpc_api.delete_vpc(vpc_id=vpc.id) 32 | 33 | 34 | def safe_wait_for_cluster(k8s_api: K8SV1API, cluster_id: str): 35 | try: 36 | return k8s_api.wait_for_cluster(cluster_id=cluster_id) 37 | except ScalewayException as e: 38 | err_type = getattr(e, "type", None) or getattr(e, "error", None) 39 | if err_type == "not_found" or "not found" in str(e).lower(): 40 | return None 41 | raise 42 | 43 | 44 | @scw_vcr.use_cassette 45 | def test_k8s_cluster_list(k8s_api: K8SV1API, private_network: PrivateNetwork) -> None: 46 | cluster = k8s_api.create_cluster( 47 | type_="kapsule", 48 | version="1.32.7", 49 | cni=CNI.CILIUM, 50 | description="", 51 | private_network_id=private_network.id, 52 | ) 53 | assert cluster.id is not None 54 | 55 | clusters = k8s_api.list_clusters() 56 | assert clusters.total_count >= 1 57 | 58 | k8s_api.delete_cluster(cluster_id=cluster.id, with_additional_resources=True) 59 | cluster = safe_wait_for_cluster(k8s_api=k8s_api, cluster_id=cluster.id) 60 | assert cluster is None 61 | -------------------------------------------------------------------------------- /scaleway-core/scaleway_core/utils/resolve_one_of.py: -------------------------------------------------------------------------------- 1 | from __future__ import annotations 2 | from dataclasses import dataclass 3 | from typing import Any, Dict, Generic, List, Optional, TypeVar, TYPE_CHECKING 4 | 5 | if TYPE_CHECKING: 6 | from collections.abc import Callable 7 | from _typeshed import SupportsKeysAndGetItem 8 | 9 | T = TypeVar("T") 10 | 11 | 12 | @dataclass 13 | class OneOfPossibility(Generic[T]): 14 | param: str 15 | value: Optional[T] 16 | default: Optional[T] = None 17 | marshal_func: Optional[Callable[[T, T], Dict[str, Any]]] = None 18 | 19 | 20 | def resolve_one_of( 21 | possibilities: List[OneOfPossibility[Any]], is_required: bool = False 22 | ) -> SupportsKeysAndGetItem[str, Any]: 23 | """ 24 | Resolves the ideal parameter and value amongst an optional list. 25 | Uses marshal_func if provided. 26 | """ 27 | 28 | # Try to resolve using non-None value 29 | for possibility in possibilities: 30 | if possibility.value is not None: 31 | if possibility.marshal_func is not None: 32 | return { 33 | possibility.param: possibility.marshal_func( 34 | possibility.value, possibility.default 35 | ) 36 | } 37 | return {possibility.param: possibility.value} 38 | 39 | for possibility in possibilities: 40 | if possibility.default is not None: 41 | if possibility.marshal_func is not None: 42 | # When no actual value, call with None as value 43 | return { 44 | possibility.param: possibility.marshal_func( 45 | None, possibility.default 46 | ) 47 | } 48 | return {possibility.param: possibility.default} 49 | 50 | # If required but unresolved, raise an error 51 | if is_required: 52 | possibilities_keys = " or ".join( 53 | [possibility.param for possibility in possibilities] 54 | ) 55 | raise ValueError(f"one of ${possibilities_keys} must be present") 56 | 57 | # Else, return empty dict 58 | return {} 59 | -------------------------------------------------------------------------------- /.github/workflows/nightly.yml: -------------------------------------------------------------------------------- 1 | name: Nightly Tests 2 | permissions: 3 | actions: read 4 | 5 | on: 6 | schedule: 7 | - cron: '0 0 * * *' 8 | 9 | jobs: 10 | nightly: 11 | strategy: 12 | fail-fast: false 13 | matrix: 14 | python-version: [ '3.10' ,'3.11', '3.12', '3.13' ] 15 | products: 16 | - instance 17 | - k8s 18 | - vpc 19 | lib: 20 | - scaleway 21 | runs-on: ubuntu-latest 22 | defaults: 23 | run: 24 | working-directory: ${{ matrix.lib }} 25 | steps: 26 | - uses: actions/checkout@v6 27 | - name: Install poetry 28 | run: pipx install poetry 29 | - name: Setup Python 30 | uses: actions/setup-python@v6 31 | with: 32 | python-version: ${{ matrix.python-version }} 33 | cache: "poetry" 34 | - name: Install dependencies and library 35 | run: poetry install 36 | - name: Run Tests 37 | env: 38 | PYTHON_UPDATE_CASSETTES: true 39 | SCW_ACCESS_KEY: ${{ secrets.SCW_ACCESS_KEY }} 40 | SCW_SECRET_KEY: ${{ secrets.SCW_SECRET_KEY }} 41 | SCW_DEFAULT_ORGANIZATION_ID: ${{ secrets.SCW_DEFAULT_ORGANIZATION_ID }} 42 | SCW_DEFAULT_PROJECT_ID: ${{ secrets.SCW_DEFAULT_PROJECT_ID }} 43 | run: poetry run pytest -v --timeout=14400 ./${{ matrix.lib }}/${{ matrix.products }}/ 44 | - name: Ping on failure 45 | if: ${{ failure() }} 46 | run: | 47 | curl -X POST -H 'Content-type: application/json' \ 48 | --data '{ 49 | "blocks": [ 50 | { 51 | "type": "section", 52 | "text": { 53 | "type": "mrkdwn", 54 | "text": "'"Scaleway SDK Python Nightly workflow failed: "'" 55 | } 56 | } 57 | ] 58 | }' \ 59 | "${SLACK_WEBHOOK_NIGHTLY}"; 60 | env: 61 | SLACK_WEBHOOK_NIGHTLY: ${{ secrets.SLACK_WEBHOOK_NIGHTLY }} 62 | FAILED_PRODUCT: "${{ matrix.products }}" 63 | -------------------------------------------------------------------------------- /scaleway/scaleway/rdb/v1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | DatabaseBackupStatus, 6 | InstanceLogStatus, 7 | InstanceStatus, 8 | MaintenanceStatus, 9 | ReadReplicaStatus, 10 | SnapshotStatus, 11 | ) 12 | 13 | DATABASE_BACKUP_TRANSIENT_STATUSES: list[DatabaseBackupStatus] = [ 14 | DatabaseBackupStatus.CREATING, 15 | DatabaseBackupStatus.RESTORING, 16 | DatabaseBackupStatus.DELETING, 17 | DatabaseBackupStatus.EXPORTING, 18 | ] 19 | """ 20 | Lists transient statutes of the enum :class:`DatabaseBackupStatus `. 21 | """ 22 | INSTANCE_LOG_TRANSIENT_STATUSES: list[InstanceLogStatus] = [ 23 | InstanceLogStatus.CREATING, 24 | ] 25 | """ 26 | Lists transient statutes of the enum :class:`InstanceLogStatus `. 27 | """ 28 | INSTANCE_TRANSIENT_STATUSES: list[InstanceStatus] = [ 29 | InstanceStatus.PROVISIONING, 30 | InstanceStatus.CONFIGURING, 31 | InstanceStatus.DELETING, 32 | InstanceStatus.AUTOHEALING, 33 | InstanceStatus.INITIALIZING, 34 | InstanceStatus.BACKUPING, 35 | InstanceStatus.SNAPSHOTTING, 36 | InstanceStatus.RESTARTING, 37 | ] 38 | """ 39 | Lists transient statutes of the enum :class:`InstanceStatus `. 40 | """ 41 | MAINTENANCE_TRANSIENT_STATUSES: list[MaintenanceStatus] = [ 42 | MaintenanceStatus.ONGOING, 43 | ] 44 | """ 45 | Lists transient statutes of the enum :class:`MaintenanceStatus `. 46 | """ 47 | READ_REPLICA_TRANSIENT_STATUSES: list[ReadReplicaStatus] = [ 48 | ReadReplicaStatus.PROVISIONING, 49 | ReadReplicaStatus.INITIALIZING, 50 | ReadReplicaStatus.DELETING, 51 | ReadReplicaStatus.CONFIGURING, 52 | ReadReplicaStatus.PROMOTING, 53 | ] 54 | """ 55 | Lists transient statutes of the enum :class:`ReadReplicaStatus `. 56 | """ 57 | SNAPSHOT_TRANSIENT_STATUSES: list[SnapshotStatus] = [ 58 | SnapshotStatus.CREATING, 59 | SnapshotStatus.RESTORING, 60 | SnapshotStatus.DELETING, 61 | ] 62 | """ 63 | Lists transient statutes of the enum :class:`SnapshotStatus `. 64 | """ 65 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/rdb/v1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | DatabaseBackupStatus, 6 | InstanceLogStatus, 7 | InstanceStatus, 8 | MaintenanceStatus, 9 | ReadReplicaStatus, 10 | SnapshotStatus, 11 | ) 12 | 13 | DATABASE_BACKUP_TRANSIENT_STATUSES: list[DatabaseBackupStatus] = [ 14 | DatabaseBackupStatus.CREATING, 15 | DatabaseBackupStatus.RESTORING, 16 | DatabaseBackupStatus.DELETING, 17 | DatabaseBackupStatus.EXPORTING, 18 | ] 19 | """ 20 | Lists transient statutes of the enum :class:`DatabaseBackupStatus `. 21 | """ 22 | INSTANCE_LOG_TRANSIENT_STATUSES: list[InstanceLogStatus] = [ 23 | InstanceLogStatus.CREATING, 24 | ] 25 | """ 26 | Lists transient statutes of the enum :class:`InstanceLogStatus `. 27 | """ 28 | INSTANCE_TRANSIENT_STATUSES: list[InstanceStatus] = [ 29 | InstanceStatus.PROVISIONING, 30 | InstanceStatus.CONFIGURING, 31 | InstanceStatus.DELETING, 32 | InstanceStatus.AUTOHEALING, 33 | InstanceStatus.INITIALIZING, 34 | InstanceStatus.BACKUPING, 35 | InstanceStatus.SNAPSHOTTING, 36 | InstanceStatus.RESTARTING, 37 | ] 38 | """ 39 | Lists transient statutes of the enum :class:`InstanceStatus `. 40 | """ 41 | MAINTENANCE_TRANSIENT_STATUSES: list[MaintenanceStatus] = [ 42 | MaintenanceStatus.ONGOING, 43 | ] 44 | """ 45 | Lists transient statutes of the enum :class:`MaintenanceStatus `. 46 | """ 47 | READ_REPLICA_TRANSIENT_STATUSES: list[ReadReplicaStatus] = [ 48 | ReadReplicaStatus.PROVISIONING, 49 | ReadReplicaStatus.INITIALIZING, 50 | ReadReplicaStatus.DELETING, 51 | ReadReplicaStatus.CONFIGURING, 52 | ReadReplicaStatus.PROMOTING, 53 | ] 54 | """ 55 | Lists transient statutes of the enum :class:`ReadReplicaStatus `. 56 | """ 57 | SNAPSHOT_TRANSIENT_STATUSES: list[SnapshotStatus] = [ 58 | SnapshotStatus.CREATING, 59 | SnapshotStatus.RESTORING, 60 | SnapshotStatus.DELETING, 61 | ] 62 | """ 63 | Lists transient statutes of the enum :class:`SnapshotStatus `. 64 | """ 65 | -------------------------------------------------------------------------------- /scaleway/scaleway/domain/v2beta1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | DNSZoneStatus, 6 | DomainFeatureStatus, 7 | DomainRegistrationStatusTransferStatus, 8 | DomainStatus, 9 | HostStatus, 10 | SSLCertificateStatus, 11 | TaskStatus, 12 | ) 13 | 14 | DNS_ZONE_TRANSIENT_STATUSES: list[DNSZoneStatus] = [ 15 | DNSZoneStatus.PENDING, 16 | ] 17 | """ 18 | Lists transient statutes of the enum :class:`DNSZoneStatus `. 19 | """ 20 | DOMAIN_FEATURE_TRANSIENT_STATUSES: list[DomainFeatureStatus] = [ 21 | DomainFeatureStatus.ENABLING, 22 | DomainFeatureStatus.DISABLING, 23 | ] 24 | """ 25 | Lists transient statutes of the enum :class:`DomainFeatureStatus `. 26 | """ 27 | DOMAIN_REGISTRATION_STATUS_TRANSFER_TRANSIENT_STATUSES: list[ 28 | DomainRegistrationStatusTransferStatus 29 | ] = [ 30 | DomainRegistrationStatusTransferStatus.PENDING, 31 | DomainRegistrationStatusTransferStatus.PROCESSING, 32 | ] 33 | """ 34 | Lists transient statutes of the enum :class:`DomainRegistrationStatusTransferStatus `. 35 | """ 36 | DOMAIN_TRANSIENT_STATUSES: list[DomainStatus] = [ 37 | DomainStatus.CREATING, 38 | DomainStatus.RENEWING, 39 | DomainStatus.XFERING, 40 | DomainStatus.EXPIRING, 41 | DomainStatus.UPDATING, 42 | DomainStatus.CHECKING, 43 | DomainStatus.DELETING, 44 | ] 45 | """ 46 | Lists transient statutes of the enum :class:`DomainStatus `. 47 | """ 48 | HOST_TRANSIENT_STATUSES: list[HostStatus] = [ 49 | HostStatus.UPDATING, 50 | HostStatus.DELETING, 51 | ] 52 | """ 53 | Lists transient statutes of the enum :class:`HostStatus `. 54 | """ 55 | SSL_CERTIFICATE_TRANSIENT_STATUSES: list[SSLCertificateStatus] = [ 56 | SSLCertificateStatus.PENDING, 57 | ] 58 | """ 59 | Lists transient statutes of the enum :class:`SSLCertificateStatus `. 60 | """ 61 | TASK_TRANSIENT_STATUSES: list[TaskStatus] = [ 62 | TaskStatus.PENDING, 63 | ] 64 | """ 65 | Lists transient statutes of the enum :class:`TaskStatus `. 66 | """ 67 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/domain/v2beta1/content.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | 4 | from .types import ( 5 | DNSZoneStatus, 6 | DomainFeatureStatus, 7 | DomainRegistrationStatusTransferStatus, 8 | DomainStatus, 9 | HostStatus, 10 | SSLCertificateStatus, 11 | TaskStatus, 12 | ) 13 | 14 | DNS_ZONE_TRANSIENT_STATUSES: list[DNSZoneStatus] = [ 15 | DNSZoneStatus.PENDING, 16 | ] 17 | """ 18 | Lists transient statutes of the enum :class:`DNSZoneStatus `. 19 | """ 20 | DOMAIN_FEATURE_TRANSIENT_STATUSES: list[DomainFeatureStatus] = [ 21 | DomainFeatureStatus.ENABLING, 22 | DomainFeatureStatus.DISABLING, 23 | ] 24 | """ 25 | Lists transient statutes of the enum :class:`DomainFeatureStatus `. 26 | """ 27 | DOMAIN_REGISTRATION_STATUS_TRANSFER_TRANSIENT_STATUSES: list[ 28 | DomainRegistrationStatusTransferStatus 29 | ] = [ 30 | DomainRegistrationStatusTransferStatus.PENDING, 31 | DomainRegistrationStatusTransferStatus.PROCESSING, 32 | ] 33 | """ 34 | Lists transient statutes of the enum :class:`DomainRegistrationStatusTransferStatus `. 35 | """ 36 | DOMAIN_TRANSIENT_STATUSES: list[DomainStatus] = [ 37 | DomainStatus.CREATING, 38 | DomainStatus.RENEWING, 39 | DomainStatus.XFERING, 40 | DomainStatus.EXPIRING, 41 | DomainStatus.UPDATING, 42 | DomainStatus.CHECKING, 43 | DomainStatus.DELETING, 44 | ] 45 | """ 46 | Lists transient statutes of the enum :class:`DomainStatus `. 47 | """ 48 | HOST_TRANSIENT_STATUSES: list[HostStatus] = [ 49 | HostStatus.UPDATING, 50 | HostStatus.DELETING, 51 | ] 52 | """ 53 | Lists transient statutes of the enum :class:`HostStatus `. 54 | """ 55 | SSL_CERTIFICATE_TRANSIENT_STATUSES: list[SSLCertificateStatus] = [ 56 | SSLCertificateStatus.PENDING, 57 | ] 58 | """ 59 | Lists transient statutes of the enum :class:`SSLCertificateStatus `. 60 | """ 61 | TASK_TRANSIENT_STATUSES: list[TaskStatus] = [ 62 | TaskStatus.PENDING, 63 | ] 64 | """ 65 | Lists transient statutes of the enum :class:`TaskStatus `. 66 | """ 67 | -------------------------------------------------------------------------------- /scaleway/scaleway/registry/v1/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | from .types import ImageStatus 4 | from .content import IMAGE_TRANSIENT_STATUSES 5 | from .types import ImageVisibility 6 | from .types import ListImagesRequestOrderBy 7 | from .types import ListNamespacesRequestOrderBy 8 | from .types import ListTagsRequestOrderBy 9 | from .types import NamespaceStatus 10 | from .content import NAMESPACE_TRANSIENT_STATUSES 11 | from .types import TagStatus 12 | from .content import TAG_TRANSIENT_STATUSES 13 | from .types import Image 14 | from .types import Namespace 15 | from .types import Tag 16 | from .types import CreateNamespaceRequest 17 | from .types import DeleteImageRequest 18 | from .types import DeleteNamespaceRequest 19 | from .types import DeleteTagRequest 20 | from .types import GetImageRequest 21 | from .types import GetNamespaceRequest 22 | from .types import GetTagRequest 23 | from .types import ListImagesRequest 24 | from .types import ListImagesResponse 25 | from .types import ListNamespacesRequest 26 | from .types import ListNamespacesResponse 27 | from .types import ListTagsRequest 28 | from .types import ListTagsResponse 29 | from .types import UpdateImageRequest 30 | from .types import UpdateNamespaceRequest 31 | from .api import RegistryV1API 32 | 33 | __all__ = [ 34 | "ImageStatus", 35 | "IMAGE_TRANSIENT_STATUSES", 36 | "ImageVisibility", 37 | "ListImagesRequestOrderBy", 38 | "ListNamespacesRequestOrderBy", 39 | "ListTagsRequestOrderBy", 40 | "NamespaceStatus", 41 | "NAMESPACE_TRANSIENT_STATUSES", 42 | "TagStatus", 43 | "TAG_TRANSIENT_STATUSES", 44 | "Image", 45 | "Namespace", 46 | "Tag", 47 | "CreateNamespaceRequest", 48 | "DeleteImageRequest", 49 | "DeleteNamespaceRequest", 50 | "DeleteTagRequest", 51 | "GetImageRequest", 52 | "GetNamespaceRequest", 53 | "GetTagRequest", 54 | "ListImagesRequest", 55 | "ListImagesResponse", 56 | "ListNamespacesRequest", 57 | "ListNamespacesResponse", 58 | "ListTagsRequest", 59 | "ListTagsResponse", 60 | "UpdateImageRequest", 61 | "UpdateNamespaceRequest", 62 | "RegistryV1API", 63 | ] 64 | -------------------------------------------------------------------------------- /scaleway-async/scaleway_async/registry/v1/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | from .types import ImageStatus 4 | from .content import IMAGE_TRANSIENT_STATUSES 5 | from .types import ImageVisibility 6 | from .types import ListImagesRequestOrderBy 7 | from .types import ListNamespacesRequestOrderBy 8 | from .types import ListTagsRequestOrderBy 9 | from .types import NamespaceStatus 10 | from .content import NAMESPACE_TRANSIENT_STATUSES 11 | from .types import TagStatus 12 | from .content import TAG_TRANSIENT_STATUSES 13 | from .types import Image 14 | from .types import Namespace 15 | from .types import Tag 16 | from .types import CreateNamespaceRequest 17 | from .types import DeleteImageRequest 18 | from .types import DeleteNamespaceRequest 19 | from .types import DeleteTagRequest 20 | from .types import GetImageRequest 21 | from .types import GetNamespaceRequest 22 | from .types import GetTagRequest 23 | from .types import ListImagesRequest 24 | from .types import ListImagesResponse 25 | from .types import ListNamespacesRequest 26 | from .types import ListNamespacesResponse 27 | from .types import ListTagsRequest 28 | from .types import ListTagsResponse 29 | from .types import UpdateImageRequest 30 | from .types import UpdateNamespaceRequest 31 | from .api import RegistryV1API 32 | 33 | __all__ = [ 34 | "ImageStatus", 35 | "IMAGE_TRANSIENT_STATUSES", 36 | "ImageVisibility", 37 | "ListImagesRequestOrderBy", 38 | "ListNamespacesRequestOrderBy", 39 | "ListTagsRequestOrderBy", 40 | "NamespaceStatus", 41 | "NAMESPACE_TRANSIENT_STATUSES", 42 | "TagStatus", 43 | "TAG_TRANSIENT_STATUSES", 44 | "Image", 45 | "Namespace", 46 | "Tag", 47 | "CreateNamespaceRequest", 48 | "DeleteImageRequest", 49 | "DeleteNamespaceRequest", 50 | "DeleteTagRequest", 51 | "GetImageRequest", 52 | "GetNamespaceRequest", 53 | "GetTagRequest", 54 | "ListImagesRequest", 55 | "ListImagesResponse", 56 | "ListNamespacesRequest", 57 | "ListNamespacesResponse", 58 | "ListTagsRequest", 59 | "ListTagsResponse", 60 | "UpdateImageRequest", 61 | "UpdateNamespaceRequest", 62 | "RegistryV1API", 63 | ] 64 | -------------------------------------------------------------------------------- /scaleway/scaleway/billing/v2beta1/__init__.py: -------------------------------------------------------------------------------- 1 | # This file was automatically generated. DO NOT EDIT. 2 | # If you have any remark or suggestion do not hesitate to open an issue. 3 | from .types import DiscountDiscountMode 4 | from .types import DiscountFilterType 5 | from .types import DownloadInvoiceRequestFileType 6 | from .types import ExportInvoicesRequestFileType 7 | from .types import ExportInvoicesRequestOrderBy 8 | from .types import InvoiceType 9 | from .types import ListConsumptionsRequestOrderBy 10 | from .types import ListDiscountsRequestOrderBy 11 | from .types import ListInvoicesRequestOrderBy 12 | from .types import ListTaxesRequestOrderBy 13 | from .types import DiscountCoupon 14 | from .types import DiscountFilter 15 | from .types import ListConsumptionsResponseConsumption 16 | from .types import Discount 17 | from .types import Invoice 18 | from .types import ListTaxesResponseTax 19 | from .types import DownloadInvoiceRequest 20 | from .types import ExportInvoicesRequest 21 | from .types import GetInvoiceRequest 22 | from .types import ListConsumptionsRequest 23 | from .types import ListConsumptionsResponse 24 | from .types import ListDiscountsRequest 25 | from .types import ListDiscountsResponse 26 | from .types import ListInvoicesRequest 27 | from .types import ListInvoicesResponse 28 | from .types import ListTaxesRequest 29 | from .types import ListTaxesResponse 30 | from .types import RedeemCouponRequest 31 | from .api import BillingV2Beta1API 32 | 33 | __all__ = [ 34 | "DiscountDiscountMode", 35 | "DiscountFilterType", 36 | "DownloadInvoiceRequestFileType", 37 | "ExportInvoicesRequestFileType", 38 | "ExportInvoicesRequestOrderBy", 39 | "InvoiceType", 40 | "ListConsumptionsRequestOrderBy", 41 | "ListDiscountsRequestOrderBy", 42 | "ListInvoicesRequestOrderBy", 43 | "ListTaxesRequestOrderBy", 44 | "DiscountCoupon", 45 | "DiscountFilter", 46 | "ListConsumptionsResponseConsumption", 47 | "Discount", 48 | "Invoice", 49 | "ListTaxesResponseTax", 50 | "DownloadInvoiceRequest", 51 | "ExportInvoicesRequest", 52 | "GetInvoiceRequest", 53 | "ListConsumptionsRequest", 54 | "ListConsumptionsResponse", 55 | "ListDiscountsRequest", 56 | "ListDiscountsResponse", 57 | "ListInvoicesRequest", 58 | "ListInvoicesResponse", 59 | "ListTaxesRequest", 60 | "ListTaxesResponse", 61 | "RedeemCouponRequest", 62 | "BillingV2Beta1API", 63 | ] 64 | --------------------------------------------------------------------------------