Skip to main content
https://github.com/gocept/gocept.collmex/workflows/tests/badge.svg https://coveralls.io/repos/github/gocept/gocept.collmex/badge.svg?branch=master Current version on PyPI Supported Python versions

Introduction

Collmex is an online ERP system for (small) companies with a focus on simple accounting. <http://www.collmex.de> (Note: Collmex is Germany-based but seems to support English. You’re bound to stumble over German strings, though.)

This package aims to provide pythonic bindings to program against Collmex’ API. It includes transaction management for integration with the ZODB or other databases that can integrate with the transaction package.

Credentials

To initialize a connection to the collmex server, login-credentials are required. These can be given explicitely when the gocept.collmex.collmex.Collmex object is created or via an ini file named collmex.ini. The ini file must live in the project directory or any of it’s parent directories, e.g. it is possible to place collmex.ini in your home directory to use those credentials for all of your projects. The ini file must contain the section [credentials] for production and [test-credentials] for testing purposes. Each section must have the following options: customer_id, company_id, username and password. The file collmex.ini-example can be used as a template.

Example:

[credentials]
customer_id = 42555
company_id = 1
username = realuser
password = realpassword

[test-credentials]
customer_id = 41222
company_id = 1
username = testuser
password = testpassword

Faux Collmex server

gocept.collmex.faux provides an in-memory server that mimics the parts of the Collmex HTTP interface this package uses, including the CSV API and some basic HTML/Forms to emulate resetting the environment.

The faux server is available as the session-scoped pytest fixture faux_collmex. To use it in a project, import it in your conftest.py so pytest picks it up:

from gocept.collmex.faux import faux_collmex  # noqa: F401

and request it in your tests:

def test_create_product(faux_collmex):
    ...

The fixture becomes a no-op when the environment variable COLLMEX_FAUX=0 or COLLMEX_TEST_LIVE=1 is set (tests shall run against the live Collmex test system), or when COLLMEX_API_URL is already set (it is left alone, e.g. to run against an externally started faux server).

Development

We use uv and tox for development. To run the tests:

uvx --from tox --with tox-uv tox

or, to run a specific environment:

uvx --from tox --with tox-uv tox -e py313

To build the distribution, use uv build.

The changelog is managed with scriv: for each user-visible change, run uv run scriv create, edit the fragment created in changelog.d/, and commit it together with your change (this avoids merge conflicts in CHANGES.rst).

Releases are made with zest.releaser via uv run fullrelease. It collects the fragments into CHANGES.rst with the release version automatically.

Testing

By default, the test suite runs against the faux Collmex server shipped with this package, see Faux Collmex server. It is wired autouse in conftest.py and needs no configuration.

To run the tests against the live Collmex test system instead (see collmex.ini-example), set both COLLMEX_FAUX=0 and COLLMEX_TEST_LIVE=1. The easiest way is the dedicated tox environment (Python 3.12):

uvx --from tox --with tox-uv tox -e py312-live

The live test system is a shared resource: concurrent test runs delete each other’s data and can lock the test account (some tests deliberately use invalid credentials). Therefore, serialise all test runs that use it.

Metadata

Release files for gocept.collmex 3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gocept.collmex 3.0
File Size Uploaded Provenance Actions
gocept_collmex-3.0.tar.gz 39.2 kB Without provenance Details for gocept_collmex-3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gocept.collmex 3.0
File Interpreter ABI Platform Actions
gocept_collmex-3.0-py3-none-any.whl Python 3 none any Details for gocept_collmex-3.0-py3-none-any.whl

Total release size: 77.7 kB

Release files / gocept_collmex-3.0.tar.gz

Download URL gocept_collmex-3.0.tar.gz
Size 39.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a94fd6cbd5e45ea06875cf238dbf06d082f3a82a0c506779a4f18bf018727ec3
BLAKE2b-256 checksum
How to use checksums
2708567468f7d4d6c19c909f7038c2fe2301c96901a86731cfc049384b5039ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / gocept_collmex-3.0-py3-none-any.whl

Download URL gocept_collmex-3.0-py3-none-any.whl
Size 38.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
57ebd255f176e9ba19866b61869fa5c02d89d608372d8f66fd1a2f27be5c8f0e
BLAKE2b-256 checksum
How to use checksums
e44e5f813fdafce6d5b03045ab67367af10ef91a6f69563451b19bb61fe37443
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Security for gocept.collmex 3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

3.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page