Skip to main content

A Python client for the sevDesk API, automatically generated from the OpenAPI specification

Project description

sevDesk API Client (Inoffiziell)

Ein Python-Client für die sevDesk API, automatisch generiert aus der OpenAPI-Spezifikation. Dies ist notwendig, da sich die sevdesk-Spezifikation mit dem Standard OpenApi-Generator nicht parsen lässt.

⚠️ Wichtige Hinweise

  • Dies ist KEINE offizielle sevDesk Library
  • Ich arbeite nicht für sevDesk und bin nicht mit sevDesk verbunden
  • Nutzung auf eigene Gefahr
  • Keine Garantie für Funktionalität oder Vollständigkeit
  • Bei Problemen mit Markenrechten oder dem Library-Namen kontaktieren Sie mich bitte
  • Falls sich offizielle Vertreter von sevDesk am Namen der Library stören, bin ich bereit, diesen zu übertragen oder die Library unter einem anderen Namen zu veröffentlichen

Installation

pip install sevdesk

Anforderungen

  • Python 3.8+
  • pydantic
  • requests
  • pyyaml
  • jinja2

Verwendung

Client initialisieren

from sevdesk import Client

# API Token von sevDesk Dashboard holen
client = Client('your-api-token-here')

Kontakte abrufen

# Alle Kontakte abrufen
contacts = client.contact.getContacts()

for contact in contacts:
    print(f"ID: {contact.id_}")
    print(f"Name: {contact.name or f'{contact.surename} {contact.familyname}'}")
    print(f"Kundennummer: {contact.customerNumber}")
    print(f"Status: {contact.status}")
    print("-" * 40)

Neuen Kontakt erstellen

from sevdesk.models.contact import Contact
from sevdesk.converters.category import Category

# Organisation erstellen
company = Contact(
    name="Acme Corporation GmbH",
    category=Category(id_=3, objectName="Category")
)
new_company = client.contact.createContact(body=company)
print(f"Organisation erstellt mit ID: {new_company.id_}")

# Person erstellen
person = Contact(
    surename="Max",
    familyname="Mustermann",
    gender="m",
    category=Category(id_=3, objectName="Category")
)
new_person = client.contact.createContact(body=person)
print(f"Person erstellt mit ID: {new_person.id_}")

Rechnungen abrufen

# Alle Rechnungen abrufen
invoices = client.invoice.getInvoices()

for invoice in invoices:
    print(f"Rechnungsnummer: {invoice.invoiceNumber}")
    print(f"Datum: {invoice.invoiceDate}")
    print(f"Betrag: {invoice.sumGross} {invoice.currency}")
    print(f"Status: {invoice.status}")
    print("-" * 40)

Angebote abrufen

# Alle Angebote abrufen
orders = client.order.getOrders()

for order in orders:
    print(f"Angebotsnummer: {order.orderNumber}")
    print(f"Datum: {order.orderDate}")
    print(f"Betrag: {order.sumGross} {order.currency}")
    print(f"Status: {order.status}")
    print("-" * 40)

Kontakt aktualisieren

from sevdesk.models.contactupdate import ContactUpdate

# Kontakt aktualisieren
update_data = ContactUpdate(
    name="Neue Firma GmbH"
)
updated = client.contact.updateContact(contactId=123456, body=update_data)
print(f"Kontakt aktualisiert: {updated.name}")

Kontakt löschen

# Kontakt löschen
client.contact.deleteContact(contactId=123456)
print("Kontakt gelöscht")

Verfügbare Controller

Der Client lädt automatisch alle verfügbaren Controller aus der OpenAPI-Spezifikation:

  • client.contact - Kontaktverwaltung
  • client.invoice - Rechnungsverwaltung
  • client.order - Angebotsverwaltung
  • client.voucher - Belegverwaltung
  • client.part - Artikelverwaltung
  • ... und viele mehr

Alle Endpoints sind als Methoden verfügbar und vollständig typisiert für IDE-Unterstützung.

Code neu generieren

Falls sich die sevDesk API ändert:

# Neue openapi.yaml herunterladen
# Dann Generator ausführen:
python -m generator

Dies generiert automatisch:

  • Models in sevdeskapi/models/
  • Converter in sevdeskapi/converters/
  • Controller in sevdeskapi/controllers/

Das wird zeitnah über Github Actions abgebildet!

Lizenz / Haftungsausschluss

MIT License - Siehe LICENSE Datei

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sevdesk-0.1.2.tar.gz (24.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sevdesk-0.1.2-py3-none-any.whl (67.6 kB view details)

Uploaded Python 3

File details

Details for the file sevdesk-0.1.2.tar.gz.

File metadata

  • Download URL: sevdesk-0.1.2.tar.gz
  • Upload date:
  • Size: 24.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sevdesk-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b4984535b141d6c0f18529dcdc2503daee092bf23c8bfd0aadb4634a7dbbdcbf
MD5 c433528220dab77ff28fb229e9a0c64d
BLAKE2b-256 6fade61fb5c0c80a1b9e2dd1aad96337b334b6ca5bd362d4cfd3d04b979f4260

See more details on using hashes here.

Provenance

The following attestation bundles were made for sevdesk-0.1.2.tar.gz:

Publisher: publish.yml on MaximilianClemens/python-sevdesk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sevdesk-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: sevdesk-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 67.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sevdesk-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 85746db818cfd879cfa6bd09c9a79761df85c1e96ad4d8f67b9c8506db3cf9fe
MD5 ef54d21618c794edefc95fb5757f67db
BLAKE2b-256 d3c2f40f672cff1f31b5f538c6335666aa6092288933b2996e11bb1a3a967628

See more details on using hashes here.

Provenance

The following attestation bundles were made for sevdesk-0.1.2-py3-none-any.whl:

Publisher: publish.yml on MaximilianClemens/python-sevdesk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page