Skip to content

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:

LanguageInstall via GitHub
TypeScriptnpm install github:steviee/thelawin-clients#path:typescript
Pythonpip install git+https://github.com/steviee/thelawin-clients.git#subdirectory=python
Rubygem 'thelawin', git: 'https://github.com/steviee/thelawin-clients.git', glob: 'ruby/*.gemspec'
KotlinJitPack oder lokaler Build
JavaJitPack oder lokaler Build
Swifthttps://github.com/steviee/thelawin-clients.git (SPM)
Dartgit: 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

FeatureTSPythonRubyKotlinJavaSwiftDartC#
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.git

Next Steps

Choose your language:

  • TypeScript - For Node.js and browser applications
  • Python - For Python projects
  • Ruby - For Ruby on Rails and Ruby projects
  • Kotlin - For Kotlin/JVM projects
  • Java - For Java projects
  • Swift - For iOS, macOS, and server-side Swift
  • Dart - For Flutter and Dart projects
  • C# - For .NET projects

ZUGFeRD 2.3 & Factur-X 1.0 compliant