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.0.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.0-py3-none-any.whl (67.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sevdesk-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 1b413f27d8a38569f96166a46705da1d83cd5c3a248936b989660e550e1ea1cc
MD5 3265a54ea0f632cea241bda9c8d4c826
BLAKE2b-256 7c2bfc27b29792d51f9dd0779315495c53623dbfc727ed007b7505469f39fc78

See more details on using hashes here.

Provenance

The following attestation bundles were made for sevdesk-0.1.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: sevdesk-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7ddf82cb9af0709e8c9f716d0fe71c7a55c1fe0b88e119fb217e2af767f874fc
MD5 cb562891236ee49f346ddbb160e8e5c4
BLAKE2b-256 a6483977e76b8c9e9a10f5c80a848fd6f4385c4c0406250f9c285b888eb24eeb

See more details on using hashes here.

Provenance

The following attestation bundles were made for sevdesk-0.1.0-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