Damascus - OpenAPI SDK Generator
Damascus is a powerful Python-based SDK generator that transforms OpenAPI specifications into elegant, type-safe client libraries. Generate professional client SDKs for your API with minimal effort.
Key Features
- Full Response Models: Converts API schemas into proper Python dataclasses
- Type Safety: Comprehensive type annotations for modern Python development
- Authentication Support: Handles API key, Bearer token and other auth methods
- Multiple Input Sources: Generate from local JSON files or remote URLs
- Template-Based: Easily customizable code generation via Jinja2 templates
- Python Version Targeting: Generate code optimized for specific Python versions
Installation
Using pip:
pip install damascus
Using uv (recommended):
uv pip install damascus
Requirements
- Runtime: Python 3.8+
- Development: Python 3.10+ recommended for modern type hints
- Dependencies: Jinja2 for templating
Quick Start
CLI Usage
Generate an SDK from an OpenAPI specification:
# From a local file
damascus generate ./path/to/openapi.json --output my_sdk
# From a URL
damascus generate https://api.example.com/openapi.json --output my_sdk
# With custom headers (for protected specs)
damascus generate https://api.example.com/openapi.json --header "Authorization: Bearer token123" --output my_sdk
SDK Usage
Once generated, using the SDK is straightforward:
from my_sdk import Client
# Initialize client
client = Client(
base_url="https://api.example.com",
api_key="your-api-key"
)
# Call API methods - responses are typed objects
response = client.get_user(user_id=123)
print(f"User name: {response.name}")
Documentation
Comprehensive documentation is available in the docs/ directory:
Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
License
Damascus is licensed under the GNU General Public License v3.0 (GPLv3) - see the LICENSE file for details.
About
Damascus is created and maintained by Beshu Limited, a UK company based in London, established in 2017.
Beshu Limited is best known for:
- ReadonlyREST: Security for Elasticsearch and Kibana
- Anaphora: Automated reporting and alerting for Kibana
Metadata
Release files for damascus 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| damascus-0.1.5.tar.gz | 40.0 kB | Without provenance | Details for damascus-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| damascus-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for damascus-0.1.5-py3-none-any.whl |
Total release size: 78.6 kB
Release files / damascus-0.1.5.tar.gz
| Download URL | damascus-0.1.5.tar.gz |
|---|---|
| Size | 40.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
edeae6f8b33d3acae0cc9a919a17ef000de9709fb99ea4582817a7504bd6b835
|
|
BLAKE2b-256 checksum How to use checksums |
037c8209d5eb49b1b84f50dd6961ee9d1c89a2123e5bc70a58aa96a1da9a2c8b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Release files / damascus-0.1.5-py3-none-any.whl
| Download URL | damascus-0.1.5-py3-none-any.whl |
|---|---|
| Size | 38.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
45209462ce67204acac8803565ba50c61985b635981dad4d73191a231ac745e8
|
|
BLAKE2b-256 checksum How to use checksums |
4bf2ef575cc128ca4af5d5b45ddd75a461edf778684f1b7b62ad40b87f4cd720
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Security for damascus 0.1.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.