Official SDKs
thelawin.dev provides official client libraries for 8 programming languages.
All SDKs share a consistent API design with:
- Fluent Builder Pattern - Chain methods to build invoices
- Type Safety - Full type definitions and autocomplete
- Automatic Logo Encoding - Load logos from files, auto Base64 encode
- Result Pattern - Clear success/failure handling
- Zero Dependencies - Minimal footprint
Installation
Beta-Phase
Während der Beta-Phase sind die SDKs direkt über GitHub verfügbar. Die Veröffentlichung auf npm, PyPI, RubyGems und anderen Package Registries erfolgt mit dem stabilen Release.
Alle SDKs können direkt vom GitHub-Repository installiert werden:
| Language | Install via GitHub |
|---|---|
| TypeScript | npm install github:steviee/thelawin-clients#path:typescript |
| Python | pip install git+https://github.com/steviee/thelawin-clients.git#subdirectory=python |
| Ruby | gem 'thelawin', git: 'https://github.com/steviee/thelawin-clients.git', glob: 'ruby/*.gemspec' |
| Kotlin | JitPack oder lokaler Build |
| Java | JitPack oder lokaler Build |
| Swift | https://github.com/steviee/thelawin-clients.git (SPM) |
| Dart | git: https://github.com/steviee/thelawin-clients.git, path: dart |
| C# | Lokaler Build oder Git Submodule |
Unified Interface
All SDKs follow the same pattern:
client = ThelawinClient(api_key)
result = client.invoice()
.number("2026-001")
.date("2026-01-15")
.seller(name: "Acme GmbH", vat_id: "DE123456789", ...)
.buyer(name: "Customer AG", ...)
.addItem(description: "Consulting", quantity: 8, unit: "HUR", unit_price: 150)
.logoFile("./logo.png") // Auto Base64 encoding
.template("minimal")
.generate()
if result.success:
result.savePdf("./invoice.pdf")
else:
for error in result.errors:
print(f"{error.path}: {error.message}")Feature Comparison
| Feature | TS | Python | Ruby | Kotlin | Java | Swift | Dart | C# |
|---|---|---|---|---|---|---|---|---|
| Async/Await | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Type Safety | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Logo from File | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
| Browser Support | ✅ | - | - | - | - | - | - | - |
Source Code
All SDKs are open source and available on GitHub:
github.com/steviee/thelawin-clients
bash
git clone https://github.com/steviee/thelawin-clients.gitNext Steps
Choose your language: