gocept.collmex


Namegocept.collmex JSON
Version 2.1.0 PyPI version JSON
download
home_pagehttps://github.com/gocept/gocept.collmex
SummaryPython-bindings for the Collmex import/export API
upload_time2024-05-31 11:06:13
maintainerNone
docs_urlNone
authorgocept
requires_python>=3.7
licenseZPL 2.1
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            .. contents::

.. image:: https://github.com/gocept/gocept.collmex/workflows/tests/badge.svg
           :target: https://github.com/gocept/gocept.collmex/actions?query=workflow%3Atests
.. image:: https://coveralls.io/repos/github/gocept/gocept.collmex/badge.svg?branch=master
           :target: https://coveralls.io/github/gocept/gocept.collmex?branch=master
.. image:: https://img.shields.io/pypi/v/gocept.collmex.svg
           :target: https://pypi.org/project/gocept.collmex/
           :alt: Current version on PyPI
.. image:: https://img.shields.io/pypi/pyversions/gocept.collmex.svg
           :target: https://pypi.org/project/gocept.collmex/
           :alt: 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


Collmex API
===========

Collmex provides a POST- and CSV-based API, which is encapsulated into a
utility that provides methods for the various CSV record types.  API
documentation is available at
http://www.collmex.de/cgi-bin/cgi.exe?1005,1,help,api.


The collmex object
------------------

The collmex object is a central place to access collmex. In the Zope 3 jargon
it is a global utility:

>>> import os
>>> import gocept.collmex.collmex
>>> os.environ['collmex_credential_section'] = 'test-credentials'
>>> collmex = gocept.collmex.collmex.Collmex()


Pre flight cleanup
------------------

First we need to clean up the Collmex environment:

>>> import gocept.collmex.testing
>>> gocept.collmex.testing.cleanup_collmex()


Transaction integration
-----------------------

gocept.collmex has support for transaction integration. All modifying calls are
buffered until the transaction is commited. XXX explain more.

>>> import transaction


Customers: ``create_customer`` and ``get_customers``
----------------------------------------------------

>>> customer = gocept.collmex.model.Customer()
>>> customer['Kundennummer'] = 10000
>>> customer['Firma'] = 'Testkunden'
>>> collmex.create(customer)
>>> transaction.commit()

Customers can be listed using the get_customers method:

>>> customers = collmex.get_customers()
>>> customers
[<gocept.collmex.model.Customer object at 0x...>, <gocept.collmex.model.Customer object at 0x...>]
>>> len(customers)
2

The first customer is the generic one:

>>> customer = customers[0]
>>> customer['Satzart']
'CMXKND'
>>> customer['Kundennummer']
'9999'
>>> customer['Firma']
'Allgemeiner Geschäftspartner'

The second customer is one created during test setup:

>>> customer = customers[1]
>>> customer['Satzart']
'CMXKND'
>>> customer['Kundennummer']
'10000'
>>> customer['Firma']
'Testkunden'

Products: ``create_product`` and ``get_products``
-------------------------------------------------

Products are created using the ``create_product`` method:

>>> product = gocept.collmex.model.Product()
>>> product['Produktnummer'] = 'TEST'
>>> product['Bezeichnung'] = 'Testprodukt'
>>> product['Produktart'] = 1 # Dienstleistung
>>> product['Basismengeneinheit'] = 'HR'
>>> product['Verkaufs-Preis'] = 5
>>> collmex.create(product)
>>> transaction.commit()
>>> collmex.get_products()[0]['Bezeichnung']
'Testprodukt'

Customer Agreements
-------------------

>>> cag = gocept.collmex.model.CustomerAgreement()
>>> cag['Kunde Nr'] = '10000'
>>> cag['Firma Nr'] = 1
>>> cag['Produktnummer'] = 'TEST'
>>> cag['Gültig ab'] = '01.01.2000'
>>> cag['Gültig bis'] = '31.12.9999'
>>> cag['Preis'] = 7
>>> cag['Währung'] = "EUR"
>>> collmex.create(cag)
>>> transaction.commit()
>>> cag_from_collmex = collmex.get_customer_agreements()
>>> list(cag)
['CMXCAG', '1', '10000', 'TEST', '(NULL)', '01.01.2000', '31.12.9999', 7, 'EUR', '(NULL)']


Invoices: ``create_invoice`` and ``get_invoices``
-------------------------------------------------

Invoices are created using the ``create_invoice`` method:

>>> import datetime
>>> start_date = datetime.datetime.now()
>>> item = gocept.collmex.model.InvoiceItem()
>>> item['Kunden-Nr'] = '10000'
>>> item['Rechnungsnummer'] = 100000
>>> item['Menge'] = 3
>>> item['Produktnummer'] = 'TEST'
>>> item['Rechnungstext'] = 'item text \u2013 with non-ascii characters'
>>> item['Positionstyp'] = 0
>>> collmex.create_invoice([item])

Invoices can be looked up again, using the ``get_invoices`` method. However, as
discussed above the invoice was only registered for addition. Querying right
now does *not* return the invoice:

>>> collmex.get_invoices(customer_id='10000', start_date=start_date)
[]

After committing, the invoice is found:

>>> transaction.commit()
>>> collmex.get_invoices(customer_id='10000',
...                      start_date=start_date)[0]['Rechnungstext']
'item text – with non-ascii characters'

Activities
----------

This section describes the API for activities (Taetigkeiten erfassen)

Create an activity
~~~~~~~~~~~~~~~~~~

A project with one set and an employee are required to submit activities:

>>> import datetime
>>> import gocept.collmex.testing
>>> gocept.collmex.testing.create_project('Testprojekt', collmex=collmex)
>>> gocept.collmex.testing.create_employee(collmex)
>>> act = gocept.collmex.model.Activity()
>>> act['Projekt Nr'] = '1' # Testprojekt
>>> act['Mitarbeiter Nr'] = '1' # Sebastian Wehrmann
>>> act['Satz Nr'] = '1' # TEST
>>> act['Beschreibung'] = 'allgemeine T\xe4tigkeit'
>>> act['Datum'] = datetime.date(2012, 1, 23)
>>> act['Von'] = datetime.time(8, 7)
>>> act['Bis'] = datetime.time(14, 28)
>>> act['Pausen'] = datetime.timedelta(hours=1, minutes=12)
>>> collmex.create(act)
>>> transaction.commit()

Export using ``get_activities``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

``get_activities`` returns Activity objects.

.. ATTENTION:: In previous versions this method returnd a raw CSV string. This
      was due to Collmex not having an actual API.


>>> activities = collmex.get_activities()
>>> activities[0]['Beschreibung']
'allgemeine T\xe4tigkeit'


Projects: ``get_projects``
--------------------------

Projects can be exported with the ``get_projects`` API. It returns an entry
for every project set (Projektsatz) of each project (Projekt):

>>> proj = collmex.get_projects()
>>> len(proj)
2
>>> proj[0]['Projektnummer'] == proj[1]['Projektnummer']
True

>>> proj[0]['Satz']
'7,00'
>>> proj[1]['Satz']
'9,65'
>>> proj[0]['Inaktiv']
'0'

Caching
-------

Results queried from Collmex are cached for the duration of the transaction.

To demonstrate this, we instrument the _post() method that performs the actual
HTTP communication to show when it is called:

>>> original_post = collmex._post
>>> def tracing_post(self, *args, **kw):
...     print('cache miss')
...     return original_post(*args, **kw)
>>> collmex._post = tracing_post.__get__(collmex, type(collmex))

The first time in an transaction is retrieved from Collmex, of course:

>>> transaction.abort()
>>> collmex.get_products()[0]['Bezeichnung']
cache miss
'Testprodukt'

But after that, values are cached:

>>> collmex.get_products()[0]['Bezeichnung']
'Testprodukt'

When the transaction ends, the cache is invalidated:

>>> transaction.commit()
>>> collmex.get_products()[0]['Bezeichnung']
cache miss
'Testprodukt'

>>> collmex.get_products()[0]['Bezeichnung']
'Testprodukt'

Remove tracing instrumentation:

>>> collmex._post = original_post


Changes
=======

2.1.0 (2024-05-31)
------------------

- Update invoice items to current collmex field names.
  (`#27 <https://github.com/gocept/gocept.collmex/pull/27>`_)

- Add CustomerAgreement (CMXCAG)


2.0.1 (2023-08-23)
------------------

- Mark wheel as not universal.


2.0 (2023-08-23)
----------------

- Drop support for Python 2.7, 3.5, 3.6.

- Add support for Python 3.9, 3.10, 3.11.

- Avoid password exhaustion by using invalid username for tests.

- Fix the tests to use fewer connections.


1.9 (2019-09-02)
----------------

- Drop support for Python 3.3 and 3.4.

- Add support for Python 3.6, 3.7 and 3.8b4.

- Migrate code to GitHub.

- Update tests to new Collmex URLs.


1.8.3 (2018-03-16)
------------------

- Implemented CMXABO, only applicable for "collmex Verein".


1.8.2 (2017-01-23)
------------------

- Implemented `MITGLIED_GET` as `get_members()` and `CMXMGD`
  as `models.Member`, both only applicable for "collmex Verein".


1.8.1 (2016-06-09)
------------------

- Extend `Project` to retrieve budget and summed up work via API.


1.8.0 (2016-01-27)
------------------

- Declared compatibility with Python 3.4.

- Drop support for Python 3.2.

- Made sure tests don't use invalid credentials on test account too many times
  in a row.

- Raise ``ValueError`` if the Collmex website returned an error during
  ``Collmex.browser_login``. Until now the error was hidden, but the following
  action failed. In particular this should help to spot invalid credentials.



1.7.0 (2014-09-04)
------------------

- Use collmex.ini file given by the path in environment variable
  ``COLLMEX_INI`` if present, only otherwise look upward from the current
  directory.

- Don't log the password in our debug output.


1.6.0 (2014-08-18)
------------------

- Un-deprecate method ``Collmex.create_invoice``, it now takes care of
  automatically allocating invoice ids.

- Add ``gocept.collmex.testing.ConsoleDump`` utility that fakes a collmex
  connection, but only logs method calls.


1.5.1 (2013-12-09)
------------------

- Fix brown bag release 1.5.0


1.5.0 (2013-12-09)
------------------

- Added methods to Activity to parse/calculate the dates, times, breaks,
  duration.


1.4.4 (2013-09-25)
------------------

- Improve check for invalid credentials when ``gocept.collmex.collmex.Collmex``
  is created.

- Yield more detailed information when parsing of the ini file failed.

1.4.3 (2013-09-24)
------------------

- Fix the check for invalid credentials when ``gocept.collmex.collmex.Collmex``
  is created.


1.4.2 (2013-09-23)
------------------

- Credentials to log into Collmex can be given via an `collmex.ini` file.


1.4.1 (2013-09-16)
------------------

- Creation of test activities is now fully customizable


1.4 (2013-09-13)
----------------

- gocept.collmex is now compatible with Python 3.2 and Python 3.3!


1.3 (2013-02-22)
----------------

- Implement activities API (#11954).


1.2.1 (2012-03-09)
------------------

- Fix ``gocept.collmex.collmex.Collmex.browser_login()`` after collmex website
  changed wich included a rename of form elements.



1.2 (2012-02-21)
----------------

Note: This version was accidentally released without the changes in 1.1.1,
however, the release itself contained the changes of 1.1 and thus isn't
broken.

- Add ``Inaktiv`` attribute on ``CMXPRJ`` (projects)


1.1.1 (2012-02-17)
------------------

- Rectify previous brown-bag release.


1.1 (2012-02-17)
----------------

- Do not honour Collmex' robots.txt as of 2012-02-09. :(


1.0 (2012-01-23)
----------------

- Forced usage of Python 2.7.

- Added testing helper ``get_collmex`` to create a collmex object from
  environment variables.

- Made testing helper ``collmex_login()`` a method: ``gocept.collmex.collmex.Collmex.browser_login()``

- Modified signature of testing helper ``create_activity``, so it no longer
  needs a parameter.


0.9 (2012-01-20)
----------------

- Added testing helper ``create_activity``.


0.8 (2012-01-20)
----------------

- Added API for retrieving activities (``get_activities``).

- Updated tests and test infrastructure to recent changes in Collmex.


0.7 (2009-11-05)
----------------

- Added API for retrieving projects and creation of activities.

0.6 (2009-02-16)
----------------

- Make models robust against API changes so they don't immediately break when
  the record becomes longer.
- Updated customer model to current API.

0.5.1 (2009-01-08)
------------------

- Fixed multi-threading bug: thread-local data needs to be intialized for each
  thread.

0.5 (2008-12-19)
----------------

- Values returned from Collmex are converted to unicode.
- Cache results for the duration of the transaction.

0.4 (2008-12-11)
----------------

- Added `get_products` and `create_product`.
- Added `create_customer`.
- gocept.collmex.testing.cleanup_collmex() now only deletes any existing data,
  it does not add any sample customers or products, use the API for that.

0.3.1 (2008-12-02)
------------------

- Python 2.5 compatibility.

0.3 (2008-12-01)
----------------

- Using Windows-1252 as encoding when uploading data (used to be ISO-8859-1).
- Fixed transaction integration when upload fails.

0.2 (2008-11-28)
----------------

- Modifications for changed Collmex API.
- Added ``get_customers`` to query customers (API ``CUSTOMER_GET``).

0.1 (2008-10-14)
----------------

- first release. Supports getting and storing invoices.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/gocept/gocept.collmex",
    "name": "gocept.collmex",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": null,
    "author": "gocept",
    "author_email": "mail@gocept.com",
    "download_url": "https://files.pythonhosted.org/packages/c3/26/1b67a2068e82864181a00592b1d8bc0d68aee73811c741bc0ad687f58e02/gocept.collmex-2.1.0.tar.gz",
    "platform": null,
    "description": ".. contents::\n\n.. image:: https://github.com/gocept/gocept.collmex/workflows/tests/badge.svg\n           :target: https://github.com/gocept/gocept.collmex/actions?query=workflow%3Atests\n.. image:: https://coveralls.io/repos/github/gocept/gocept.collmex/badge.svg?branch=master\n           :target: https://coveralls.io/github/gocept/gocept.collmex?branch=master\n.. image:: https://img.shields.io/pypi/v/gocept.collmex.svg\n           :target: https://pypi.org/project/gocept.collmex/\n           :alt: Current version on PyPI\n.. image:: https://img.shields.io/pypi/pyversions/gocept.collmex.svg\n           :target: https://pypi.org/project/gocept.collmex/\n           :alt: Supported Python versions\n\n\nIntroduction\n============\n\nCollmex is an online ERP system for (small) companies with a focus on simple\naccounting. <http://www.collmex.de> (Note: Collmex is Germany-based but seems\nto support English. You're bound to stumble over German strings, though.)\n\nThis package aims to provide pythonic bindings to program against Collmex'\nAPI. It includes transaction management for integration with the ZODB or other\ndatabases that can integrate with the `transaction` package.\n\n\nCredentials\n===========\n\nTo 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``.\nThe 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.\nThe ini file must contain the section ``[credentials]`` for production and ``[test-credentials]`` for testing purposes.\nEach section must have the following options: ``customer_id``, ``company_id``, ``username`` and ``password``.\nThe file ``collmex.ini-example`` can be used as a template.\n\nExample::\n\n    [credentials]\n    customer_id = 42555\n    company_id = 1\n    username = realuser\n    password = realpassword\n\n    [test-credentials]\n    customer_id = 41222\n    company_id = 1\n    username = testuser\n    password = testpassword\n\n\nCollmex API\n===========\n\nCollmex provides a POST- and CSV-based API, which is encapsulated into a\nutility that provides methods for the various CSV record types.  API\ndocumentation is available at\nhttp://www.collmex.de/cgi-bin/cgi.exe?1005,1,help,api.\n\n\nThe collmex object\n------------------\n\nThe collmex object is a central place to access collmex. In the Zope 3 jargon\nit is a global utility:\n\n>>> import os\n>>> import gocept.collmex.collmex\n>>> os.environ['collmex_credential_section'] = 'test-credentials'\n>>> collmex = gocept.collmex.collmex.Collmex()\n\n\nPre flight cleanup\n------------------\n\nFirst we need to clean up the Collmex environment:\n\n>>> import gocept.collmex.testing\n>>> gocept.collmex.testing.cleanup_collmex()\n\n\nTransaction integration\n-----------------------\n\ngocept.collmex has support for transaction integration. All modifying calls are\nbuffered until the transaction is commited. XXX explain more.\n\n>>> import transaction\n\n\nCustomers: ``create_customer`` and ``get_customers``\n----------------------------------------------------\n\n>>> customer = gocept.collmex.model.Customer()\n>>> customer['Kundennummer'] = 10000\n>>> customer['Firma'] = 'Testkunden'\n>>> collmex.create(customer)\n>>> transaction.commit()\n\nCustomers can be listed using the get_customers method:\n\n>>> customers = collmex.get_customers()\n>>> customers\n[<gocept.collmex.model.Customer object at 0x...>, <gocept.collmex.model.Customer object at 0x...>]\n>>> len(customers)\n2\n\nThe first customer is the generic one:\n\n>>> customer = customers[0]\n>>> customer['Satzart']\n'CMXKND'\n>>> customer['Kundennummer']\n'9999'\n>>> customer['Firma']\n'Allgemeiner Gesch\u00e4ftspartner'\n\nThe second customer is one created during test setup:\n\n>>> customer = customers[1]\n>>> customer['Satzart']\n'CMXKND'\n>>> customer['Kundennummer']\n'10000'\n>>> customer['Firma']\n'Testkunden'\n\nProducts: ``create_product`` and ``get_products``\n-------------------------------------------------\n\nProducts are created using the ``create_product`` method:\n\n>>> product = gocept.collmex.model.Product()\n>>> product['Produktnummer'] = 'TEST'\n>>> product['Bezeichnung'] = 'Testprodukt'\n>>> product['Produktart'] = 1 # Dienstleistung\n>>> product['Basismengeneinheit'] = 'HR'\n>>> product['Verkaufs-Preis'] = 5\n>>> collmex.create(product)\n>>> transaction.commit()\n>>> collmex.get_products()[0]['Bezeichnung']\n'Testprodukt'\n\nCustomer Agreements\n-------------------\n\n>>> cag = gocept.collmex.model.CustomerAgreement()\n>>> cag['Kunde Nr'] = '10000'\n>>> cag['Firma Nr'] = 1\n>>> cag['Produktnummer'] = 'TEST'\n>>> cag['G\u00fcltig ab'] = '01.01.2000'\n>>> cag['G\u00fcltig bis'] = '31.12.9999'\n>>> cag['Preis'] = 7\n>>> cag['W\u00e4hrung'] = \"EUR\"\n>>> collmex.create(cag)\n>>> transaction.commit()\n>>> cag_from_collmex = collmex.get_customer_agreements()\n>>> list(cag)\n['CMXCAG', '1', '10000', 'TEST', '(NULL)', '01.01.2000', '31.12.9999', 7, 'EUR', '(NULL)']\n\n\nInvoices: ``create_invoice`` and ``get_invoices``\n-------------------------------------------------\n\nInvoices are created using the ``create_invoice`` method:\n\n>>> import datetime\n>>> start_date = datetime.datetime.now()\n>>> item = gocept.collmex.model.InvoiceItem()\n>>> item['Kunden-Nr'] = '10000'\n>>> item['Rechnungsnummer'] = 100000\n>>> item['Menge'] = 3\n>>> item['Produktnummer'] = 'TEST'\n>>> item['Rechnungstext'] = 'item text \\u2013 with non-ascii characters'\n>>> item['Positionstyp'] = 0\n>>> collmex.create_invoice([item])\n\nInvoices can be looked up again, using the ``get_invoices`` method. However, as\ndiscussed above the invoice was only registered for addition. Querying right\nnow does *not* return the invoice:\n\n>>> collmex.get_invoices(customer_id='10000', start_date=start_date)\n[]\n\nAfter committing, the invoice is found:\n\n>>> transaction.commit()\n>>> collmex.get_invoices(customer_id='10000',\n...                      start_date=start_date)[0]['Rechnungstext']\n'item text \u2013 with non-ascii characters'\n\nActivities\n----------\n\nThis section describes the API for activities (Taetigkeiten erfassen)\n\nCreate an activity\n~~~~~~~~~~~~~~~~~~\n\nA project with one set and an employee are required to submit activities:\n\n>>> import datetime\n>>> import gocept.collmex.testing\n>>> gocept.collmex.testing.create_project('Testprojekt', collmex=collmex)\n>>> gocept.collmex.testing.create_employee(collmex)\n>>> act = gocept.collmex.model.Activity()\n>>> act['Projekt Nr'] = '1' # Testprojekt\n>>> act['Mitarbeiter Nr'] = '1' # Sebastian Wehrmann\n>>> act['Satz Nr'] = '1' # TEST\n>>> act['Beschreibung'] = 'allgemeine T\\xe4tigkeit'\n>>> act['Datum'] = datetime.date(2012, 1, 23)\n>>> act['Von'] = datetime.time(8, 7)\n>>> act['Bis'] = datetime.time(14, 28)\n>>> act['Pausen'] = datetime.timedelta(hours=1, minutes=12)\n>>> collmex.create(act)\n>>> transaction.commit()\n\nExport using ``get_activities``\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n``get_activities`` returns Activity objects.\n\n.. ATTENTION:: In previous versions this method returnd a raw CSV string. This\n      was due to Collmex not having an actual API.\n\n\n>>> activities = collmex.get_activities()\n>>> activities[0]['Beschreibung']\n'allgemeine T\\xe4tigkeit'\n\n\nProjects: ``get_projects``\n--------------------------\n\nProjects can be exported with the ``get_projects`` API. It returns an entry\nfor every project set (Projektsatz) of each project (Projekt):\n\n>>> proj = collmex.get_projects()\n>>> len(proj)\n2\n>>> proj[0]['Projektnummer'] == proj[1]['Projektnummer']\nTrue\n\n>>> proj[0]['Satz']\n'7,00'\n>>> proj[1]['Satz']\n'9,65'\n>>> proj[0]['Inaktiv']\n'0'\n\nCaching\n-------\n\nResults queried from Collmex are cached for the duration of the transaction.\n\nTo demonstrate this, we instrument the _post() method that performs the actual\nHTTP communication to show when it is called:\n\n>>> original_post = collmex._post\n>>> def tracing_post(self, *args, **kw):\n...     print('cache miss')\n...     return original_post(*args, **kw)\n>>> collmex._post = tracing_post.__get__(collmex, type(collmex))\n\nThe first time in an transaction is retrieved from Collmex, of course:\n\n>>> transaction.abort()\n>>> collmex.get_products()[0]['Bezeichnung']\ncache miss\n'Testprodukt'\n\nBut after that, values are cached:\n\n>>> collmex.get_products()[0]['Bezeichnung']\n'Testprodukt'\n\nWhen the transaction ends, the cache is invalidated:\n\n>>> transaction.commit()\n>>> collmex.get_products()[0]['Bezeichnung']\ncache miss\n'Testprodukt'\n\n>>> collmex.get_products()[0]['Bezeichnung']\n'Testprodukt'\n\nRemove tracing instrumentation:\n\n>>> collmex._post = original_post\n\n\nChanges\n=======\n\n2.1.0 (2024-05-31)\n------------------\n\n- Update invoice items to current collmex field names.\n  (`#27 <https://github.com/gocept/gocept.collmex/pull/27>`_)\n\n- Add CustomerAgreement (CMXCAG)\n\n\n2.0.1 (2023-08-23)\n------------------\n\n- Mark wheel as not universal.\n\n\n2.0 (2023-08-23)\n----------------\n\n- Drop support for Python 2.7, 3.5, 3.6.\n\n- Add support for Python 3.9, 3.10, 3.11.\n\n- Avoid password exhaustion by using invalid username for tests.\n\n- Fix the tests to use fewer connections.\n\n\n1.9 (2019-09-02)\n----------------\n\n- Drop support for Python 3.3 and 3.4.\n\n- Add support for Python 3.6, 3.7 and 3.8b4.\n\n- Migrate code to GitHub.\n\n- Update tests to new Collmex URLs.\n\n\n1.8.3 (2018-03-16)\n------------------\n\n- Implemented CMXABO, only applicable for \"collmex Verein\".\n\n\n1.8.2 (2017-01-23)\n------------------\n\n- Implemented `MITGLIED_GET` as `get_members()` and `CMXMGD`\n  as `models.Member`, both only applicable for \"collmex Verein\".\n\n\n1.8.1 (2016-06-09)\n------------------\n\n- Extend `Project` to retrieve budget and summed up work via API.\n\n\n1.8.0 (2016-01-27)\n------------------\n\n- Declared compatibility with Python 3.4.\n\n- Drop support for Python 3.2.\n\n- Made sure tests don't use invalid credentials on test account too many times\n  in a row.\n\n- Raise ``ValueError`` if the Collmex website returned an error during\n  ``Collmex.browser_login``. Until now the error was hidden, but the following\n  action failed. In particular this should help to spot invalid credentials.\n\n\n\n1.7.0 (2014-09-04)\n------------------\n\n- Use collmex.ini file given by the path in environment variable\n  ``COLLMEX_INI`` if present, only otherwise look upward from the current\n  directory.\n\n- Don't log the password in our debug output.\n\n\n1.6.0 (2014-08-18)\n------------------\n\n- Un-deprecate method ``Collmex.create_invoice``, it now takes care of\n  automatically allocating invoice ids.\n\n- Add ``gocept.collmex.testing.ConsoleDump`` utility that fakes a collmex\n  connection, but only logs method calls.\n\n\n1.5.1 (2013-12-09)\n------------------\n\n- Fix brown bag release 1.5.0\n\n\n1.5.0 (2013-12-09)\n------------------\n\n- Added methods to Activity to parse/calculate the dates, times, breaks,\n  duration.\n\n\n1.4.4 (2013-09-25)\n------------------\n\n- Improve check for invalid credentials when ``gocept.collmex.collmex.Collmex``\n  is created.\n\n- Yield more detailed information when parsing of the ini file failed.\n\n1.4.3 (2013-09-24)\n------------------\n\n- Fix the check for invalid credentials when ``gocept.collmex.collmex.Collmex``\n  is created.\n\n\n1.4.2 (2013-09-23)\n------------------\n\n- Credentials to log into Collmex can be given via an `collmex.ini` file.\n\n\n1.4.1 (2013-09-16)\n------------------\n\n- Creation of test activities is now fully customizable\n\n\n1.4 (2013-09-13)\n----------------\n\n- gocept.collmex is now compatible with Python 3.2 and Python 3.3!\n\n\n1.3 (2013-02-22)\n----------------\n\n- Implement activities API (#11954).\n\n\n1.2.1 (2012-03-09)\n------------------\n\n- Fix ``gocept.collmex.collmex.Collmex.browser_login()`` after collmex website\n  changed wich included a rename of form elements.\n\n\n\n1.2 (2012-02-21)\n----------------\n\nNote: This version was accidentally released without the changes in 1.1.1,\nhowever, the release itself contained the changes of 1.1 and thus isn't\nbroken.\n\n- Add ``Inaktiv`` attribute on ``CMXPRJ`` (projects)\n\n\n1.1.1 (2012-02-17)\n------------------\n\n- Rectify previous brown-bag release.\n\n\n1.1 (2012-02-17)\n----------------\n\n- Do not honour Collmex' robots.txt as of 2012-02-09. :(\n\n\n1.0 (2012-01-23)\n----------------\n\n- Forced usage of Python 2.7.\n\n- Added testing helper ``get_collmex`` to create a collmex object from\n  environment variables.\n\n- Made testing helper ``collmex_login()`` a method: ``gocept.collmex.collmex.Collmex.browser_login()``\n\n- Modified signature of testing helper ``create_activity``, so it no longer\n  needs a parameter.\n\n\n0.9 (2012-01-20)\n----------------\n\n- Added testing helper ``create_activity``.\n\n\n0.8 (2012-01-20)\n----------------\n\n- Added API for retrieving activities (``get_activities``).\n\n- Updated tests and test infrastructure to recent changes in Collmex.\n\n\n0.7 (2009-11-05)\n----------------\n\n- Added API for retrieving projects and creation of activities.\n\n0.6 (2009-02-16)\n----------------\n\n- Make models robust against API changes so they don't immediately break when\n  the record becomes longer.\n- Updated customer model to current API.\n\n0.5.1 (2009-01-08)\n------------------\n\n- Fixed multi-threading bug: thread-local data needs to be intialized for each\n  thread.\n\n0.5 (2008-12-19)\n----------------\n\n- Values returned from Collmex are converted to unicode.\n- Cache results for the duration of the transaction.\n\n0.4 (2008-12-11)\n----------------\n\n- Added `get_products` and `create_product`.\n- Added `create_customer`.\n- gocept.collmex.testing.cleanup_collmex() now only deletes any existing data,\n  it does not add any sample customers or products, use the API for that.\n\n0.3.1 (2008-12-02)\n------------------\n\n- Python 2.5 compatibility.\n\n0.3 (2008-12-01)\n----------------\n\n- Using Windows-1252 as encoding when uploading data (used to be ISO-8859-1).\n- Fixed transaction integration when upload fails.\n\n0.2 (2008-11-28)\n----------------\n\n- Modifications for changed Collmex API.\n- Added ``get_customers`` to query customers (API ``CUSTOMER_GET``).\n\n0.1 (2008-10-14)\n----------------\n\n- first release. Supports getting and storing invoices.\n",
    "bugtrack_url": null,
    "license": "ZPL 2.1",
    "summary": "Python-bindings for the Collmex import/export API",
    "version": "2.1.0",
    "project_urls": {
        "Homepage": "https://github.com/gocept/gocept.collmex"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1cc97501d7ce4ccb282c3479c9b659be46585c88f0e3e003120fb7b9481f99f6",
                "md5": "26b38298fe451967ea167ecaf6602f97",
                "sha256": "d5729301241bffcbc61f968ac080eb50b8daa59151b8dbf3a99010d41bb56676"
            },
            "downloads": -1,
            "filename": "gocept.collmex-2.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "26b38298fe451967ea167ecaf6602f97",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 24301,
            "upload_time": "2024-05-31T11:06:11",
            "upload_time_iso_8601": "2024-05-31T11:06:11.725101Z",
            "url": "https://files.pythonhosted.org/packages/1c/c9/7501d7ce4ccb282c3479c9b659be46585c88f0e3e003120fb7b9481f99f6/gocept.collmex-2.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c3261b67a2068e82864181a00592b1d8bc0d68aee73811c741bc0ad687f58e02",
                "md5": "e341437788860a1246ae33c702e75cbb",
                "sha256": "51686a8119ef9a9c9e9fc7b6b59347d743d550d9f64d0f6ed6b6041cc6c71098"
            },
            "downloads": -1,
            "filename": "gocept.collmex-2.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "e341437788860a1246ae33c702e75cbb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 26101,
            "upload_time": "2024-05-31T11:06:13",
            "upload_time_iso_8601": "2024-05-31T11:06:13.497096Z",
            "url": "https://files.pythonhosted.org/packages/c3/26/1b67a2068e82864181a00592b1d8bc0d68aee73811c741bc0ad687f58e02/gocept.collmex-2.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-31 11:06:13",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "gocept",
    "github_project": "gocept.collmex",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "tox": true,
    "lcname": "gocept.collmex"
}
        
Elapsed time: 3.84419s