Skip to main content

Python library to interact with the EasyVerein API

Project description

Documentation Status License: MIT GitHub issues GitHub release (latest by date) GitHub top language pre-commit.ci status

Python EasyVerein

Full documentation is available at Read The Docs

This package contains an unofficial API client for EasyVerein written in Python. Please note that this library is unofficial and therefore not supported in any way by SD Software Design GmbH. If you have issues using this library, please do not open a support request within EasyVerein but report it to our GitHub repository instead.

State of the API

This client was written against and tested against the Hexa v1.7 API version of EasyVerein. It may or may not work with newer / older API versions, so please use them at your own risk. As the EasyVerein API does not expose model information, the models used as part of this library are specific to this library and are based on information obtained from the API responses (e.g. required fields when creating an item).

In addition to the official endpoints, the client provides some convenience functions that are not included in the official API (e.g. setting a custom field of a member to certain value, no matter if it has been set before or not or create an invoice with items in one go) which makes it much simpler to work with the API.

Not all endpoints offered by the EasyVerein API are supported. For now, only the following endpoints are implemented. When saying CRUD, it means the library supports various methods to Create, Read, Update and Delete objects. See the API reference for details on supported CRUD operations.

  • contact-details: CRUD, Soft-Delete
  • custom-fields: CRUD, Soft-Delete
  • invoice: CRUD, Soft-Delete, plus some convenience methods
  • invoice-item: CRUD
  • member: CRUD, Soft-Delete
  • member/<id>/custom-fields: CRUD, plus some convenience methods
  • wastebasket (its the official name used by the EasyVerein API to reference soft-deleted objects)

In addition to that, the library supports nested queries using the query syntax, included nested model validation. See the Usage section of this documentation for more details.

Installation

Install the package using poetry:

poetry add python-easyverein

or pip:

pip install python-easyverein

Getting Started

This simple example shows how to setup the library and retrieve all invoices:

import os
from easyverein import EasyvereinAPI

api_key = os.getenv('EV_API_KEY', '')

ev_client = EasyvereinAPI(api_key)

print(ev_client.invoice.get())

The result will be a list of invoice objects. All returned objects are Pydantic models under the hood, so you get auto-completion and a guaranteed interface for these models. For details please refer to the usage section of this documentation.

Tests

All features of this client are automatically tested against the actual API using pytest. If you want to run the tests yourself, it is advisable to create a separate demo account for that. Then, set the following environment variable to your API token and simply run pytest:

EV_API_KEY=<your-api-key>

Contributing

The client is written in pure Python, using mkdocs with mkdocstrings for documentation. Any changes or pull requests are more than welcome, but please adhere to the code style:

  • Use black for code formatting
  • Use isort based import sorting
  • Use ruff based code linting

A pre-commit hook configuration is supplied as part of the project.

Please make sure that any additions are properly tested. PRs won't get accepted if they don't have test cases to cover them.

Getting Help

Once more, this library is not officially supported by SD Software Design GmbH, the company behind EasyVerein. If you have troubles, please ask yourself the following questions:

  • Is your problem around API usage in general, which endpoint to call, which fields to set to achieve a certain thing? Do you have questions around attribute naming, usage, or why the API behaves a certain way? Those questions should be directed towards their support, as I cannot help with them.
  • is your question around how to use this library, a mistake in the Pydantic models it's using, an error in the library code or other questions around this library? Please open a GitHub issue for those questions.

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

python_easyverein-0.1.0.tar.gz (19.1 kB view details)

Uploaded Source

Built Distribution

python_easyverein-0.1.0-py3-none-any.whl (26.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: python_easyverein-0.1.0.tar.gz
  • Upload date:
  • Size: 19.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.1 Linux/6.2.0-1018-azure

File hashes

Hashes for python_easyverein-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ea66b705943b0270cfd1d9e5d62cfb7e9b243f4759d7449557e49a7a0d217b1a
MD5 c35e01c3f9750d44b105191321c3eddd
BLAKE2b-256 e0b688f1afe1fa121b866b016232ef55d95ea09296bc6cd1093aea70566eb9a5

See more details on using hashes here.

File details

Details for the file python_easyverein-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: python_easyverein-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 26.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.1 Linux/6.2.0-1018-azure

File hashes

Hashes for python_easyverein-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5a88b5cc7d4dd0ddfe3e47a5e4029e8b2c0567ac4abb64000f03f027cf15e567
MD5 5e20b6c7395c221d1ae385bf7104187c
BLAKE2b-256 9631ea0ca0fc8b5528530fd5afe63595d9c518b9fa7925fe183da60199db0c33

See more details on using hashes here.

Supported by

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