zgw-consumers


Namezgw-consumers JSON
Version 0.36.1 PyPI version JSON
download
home_pageNone
SummaryConfiguration for service (OpenAPI 3 or other) consumers
upload_time2024-12-03 11:52:48
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseCopyright 2022 Maykin Media Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords django zgw common ground vng api openapi oas mtls
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            .. zgw_consumers documentation master file, created by startproject.
   You can adapt this file completely to your liking, but it should at least
   contain the root `toctree` directive.

Welcome to ZGW Consumers' documentation!
========================================

:Version: 0.36.1
:Source: https://github.com/maykinmedia/zgw-consumers
:Keywords: OpenAPI, Zaakgericht Werken, Common Ground, NLX

|build-status| |coverage| |linting| |docs|

|python-versions| |django-versions| |pypi-version|

Manage your external API's to consume.

.. contents::

.. section-numbering::

Features
========

* Store services with their configuration in the database
* Built in `ape-pie <https://pypi.org/project/ape-pie/>`_ API client adapter
* NLX support
* Declare data/domain objects as modern Python dataclasses

Installation
============

Requirements
------------

* Python 3.10 or newer
* Django 4.2 or newer


Install
-------

1. Install from PyPI

.. code-block:: bash

    pip install zgw-consumers

2. Add ``zgw_consumers`` and ``simple_certmanager`` to the ``INSTALLED_APPS`` setting.

Usage
=====

In the Django admin, you can create ``Service`` instances to define your external APIs.

**Client**

To get a client for a given resource, you can use:

.. code-block:: python

    from zgw_consumers.client import build_client
    from zgw_consumers.models import Service

    my_service = Service.objects.get(api_root="https://api.example.com/")
    client = build_client(my_service)

    with client:
        # The preferred way to use the client is within a context manager
        client.get("relative/url")

The resulting client will have certificate and authentication automatically configured from the database configuration.

.. |build-status| image:: https://github.com/maykinmedia/zgw-consumers/workflows/Run%20CI/badge.svg
    :target: https://github.com/maykinmedia/zgw-consumers/actions?query=workflow%3A%22Run+CI%22
    :alt: Run CI

.. |linting| image:: https://github.com/maykinmedia/zgw-consumers/workflows/Code%20quality%20checks/badge.svg
    :target: https://github.com/maykinmedia/zgw-consumers/actions?query=workflow%3A%22Code+quality+checks%22
    :alt: Code linting

.. |coverage| image:: https://codecov.io/gh/maykinmedia/zgw-consumers/branch/main/graph/badge.svg
    :target: https://codecov.io/gh/maykinmedia/zgw-consumers
    :alt: Coverage status

.. |docs| image:: https://readthedocs.org/projects/zgw-consumers/badge/?version=latest
    :target: https://zgw-consumers.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status

.. |python-versions| image:: https://img.shields.io/pypi/pyversions/zgw_consumers.svg

.. |django-versions| image:: https://img.shields.io/pypi/djversions/zgw_consumers.svg

.. |pypi-version| image:: https://img.shields.io/pypi/v/zgw_consumers.svg
    :target: https://pypi.org/project/zgw_consumers/

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "zgw-consumers",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "Django, ZGW, Common Ground, VNG, API, OpenAPI, OAS, mTLS",
    "author": null,
    "author_email": "Maykin Media <support@maykinmedia.nl>",
    "download_url": "https://files.pythonhosted.org/packages/bc/98/4fa80de11214b3a80f8a245805a925eb484756952c7bfc87c194c35462cc/zgw_consumers-0.36.1.tar.gz",
    "platform": null,
    "description": ".. zgw_consumers documentation master file, created by startproject.\n   You can adapt this file completely to your liking, but it should at least\n   contain the root `toctree` directive.\n\nWelcome to ZGW Consumers' documentation!\n========================================\n\n:Version: 0.36.1\n:Source: https://github.com/maykinmedia/zgw-consumers\n:Keywords: OpenAPI, Zaakgericht Werken, Common Ground, NLX\n\n|build-status| |coverage| |linting| |docs|\n\n|python-versions| |django-versions| |pypi-version|\n\nManage your external API's to consume.\n\n.. contents::\n\n.. section-numbering::\n\nFeatures\n========\n\n* Store services with their configuration in the database\n* Built in `ape-pie <https://pypi.org/project/ape-pie/>`_ API client adapter\n* NLX support\n* Declare data/domain objects as modern Python dataclasses\n\nInstallation\n============\n\nRequirements\n------------\n\n* Python 3.10 or newer\n* Django 4.2 or newer\n\n\nInstall\n-------\n\n1. Install from PyPI\n\n.. code-block:: bash\n\n    pip install zgw-consumers\n\n2. Add ``zgw_consumers`` and ``simple_certmanager`` to the ``INSTALLED_APPS`` setting.\n\nUsage\n=====\n\nIn the Django admin, you can create ``Service`` instances to define your external APIs.\n\n**Client**\n\nTo get a client for a given resource, you can use:\n\n.. code-block:: python\n\n    from zgw_consumers.client import build_client\n    from zgw_consumers.models import Service\n\n    my_service = Service.objects.get(api_root=\"https://api.example.com/\")\n    client = build_client(my_service)\n\n    with client:\n        # The preferred way to use the client is within a context manager\n        client.get(\"relative/url\")\n\nThe resulting client will have certificate and authentication automatically configured from the database configuration.\n\n.. |build-status| image:: https://github.com/maykinmedia/zgw-consumers/workflows/Run%20CI/badge.svg\n    :target: https://github.com/maykinmedia/zgw-consumers/actions?query=workflow%3A%22Run+CI%22\n    :alt: Run CI\n\n.. |linting| image:: https://github.com/maykinmedia/zgw-consumers/workflows/Code%20quality%20checks/badge.svg\n    :target: https://github.com/maykinmedia/zgw-consumers/actions?query=workflow%3A%22Code+quality+checks%22\n    :alt: Code linting\n\n.. |coverage| image:: https://codecov.io/gh/maykinmedia/zgw-consumers/branch/main/graph/badge.svg\n    :target: https://codecov.io/gh/maykinmedia/zgw-consumers\n    :alt: Coverage status\n\n.. |docs| image:: https://readthedocs.org/projects/zgw-consumers/badge/?version=latest\n    :target: https://zgw-consumers.readthedocs.io/en/latest/?badge=latest\n    :alt: Documentation Status\n\n.. |python-versions| image:: https://img.shields.io/pypi/pyversions/zgw_consumers.svg\n\n.. |django-versions| image:: https://img.shields.io/pypi/djversions/zgw_consumers.svg\n\n.. |pypi-version| image:: https://img.shields.io/pypi/v/zgw_consumers.svg\n    :target: https://pypi.org/project/zgw_consumers/\n",
    "bugtrack_url": null,
    "license": "Copyright 2022 Maykin Media  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Configuration for service (OpenAPI 3 or other) consumers",
    "version": "0.36.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/maykinmedia/zgw-consumers/issues",
        "Changelog": "https://github.com/maykinmedia/zgw-consumers/blob/main/CHANGELOG.rst",
        "Documentation": "https://zgw-consumers.readthedocs.io/en/latest/",
        "Homepage": "https://github.com/maykinmedia/zgw-consumers",
        "Source Code": "https://github.com/maykinmedia/zgw-consumers"
    },
    "split_keywords": [
        "django",
        " zgw",
        " common ground",
        " vng",
        " api",
        " openapi",
        " oas",
        " mtls"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7e569ba025112e35c30d47826216bda50737ec1b0c0a2ff533b83fc82d6254f8",
                "md5": "73f07a0cc09ffd0841734f8d5340a90b",
                "sha256": "4780a01c287ad1d350e1df8eae479c8b9c6500e70ef32392bda913579f0067a3"
            },
            "downloads": -1,
            "filename": "zgw_consumers-0.36.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "73f07a0cc09ffd0841734f8d5340a90b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 63985,
            "upload_time": "2024-12-03T11:52:46",
            "upload_time_iso_8601": "2024-12-03T11:52:46.457679Z",
            "url": "https://files.pythonhosted.org/packages/7e/56/9ba025112e35c30d47826216bda50737ec1b0c0a2ff533b83fc82d6254f8/zgw_consumers-0.36.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bc984fa80de11214b3a80f8a245805a925eb484756952c7bfc87c194c35462cc",
                "md5": "32b61a43be6336150311eec487b1f1ab",
                "sha256": "eab57a74e4f000253f3b50bd95d89ea0766aeeb8f79dc9d8151629ac0e654a40"
            },
            "downloads": -1,
            "filename": "zgw_consumers-0.36.1.tar.gz",
            "has_sig": false,
            "md5_digest": "32b61a43be6336150311eec487b1f1ab",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 56813,
            "upload_time": "2024-12-03T11:52:48",
            "upload_time_iso_8601": "2024-12-03T11:52:48.049819Z",
            "url": "https://files.pythonhosted.org/packages/bc/98/4fa80de11214b3a80f8a245805a925eb484756952c7bfc87c194c35462cc/zgw_consumers-0.36.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-03 11:52:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "maykinmedia",
    "github_project": "zgw-consumers",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "zgw-consumers"
}
        
Elapsed time: 0.78705s