zgw-consumers


Namezgw-consumers JSON
Version 0.33.0 PyPI version JSON
download
home_pageNone
SummaryConfiguration for service (OpenAPI 3 or other) consumers
upload_time2024-03-29 15:27:37
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.33.0
: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 3.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/e6/1c/55851288ba00b9e2490de8be46901d3a98e94852625a5f511a136b61f78c/zgw-consumers-0.33.0.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.33.0\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 3.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.33.0",
    "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": "3458ecdffb321388c71f4057bb9f1948fafc72ae22173f663d04b08131272643",
                "md5": "9b06435a0c65b567a57e9f030fd33505",
                "sha256": "9f67fe8160511fb037afca7aa1fdfad7a8fd6333bb9491810ab2991f6784738b"
            },
            "downloads": -1,
            "filename": "zgw_consumers-0.33.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9b06435a0c65b567a57e9f030fd33505",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 58525,
            "upload_time": "2024-03-29T15:27:25",
            "upload_time_iso_8601": "2024-03-29T15:27:25.670685Z",
            "url": "https://files.pythonhosted.org/packages/34/58/ecdffb321388c71f4057bb9f1948fafc72ae22173f663d04b08131272643/zgw_consumers-0.33.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e61c55851288ba00b9e2490de8be46901d3a98e94852625a5f511a136b61f78c",
                "md5": "726b099f7839c5e5dbcada19d3d76527",
                "sha256": "704ed4a533ac324e121ae96df4a801de6a20558298f02c57b4dbdeacb1237b64"
            },
            "downloads": -1,
            "filename": "zgw-consumers-0.33.0.tar.gz",
            "has_sig": false,
            "md5_digest": "726b099f7839c5e5dbcada19d3d76527",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 50764,
            "upload_time": "2024-03-29T15:27:37",
            "upload_time_iso_8601": "2024-03-29T15:27:37.562691Z",
            "url": "https://files.pythonhosted.org/packages/e6/1c/55851288ba00b9e2490de8be46901d3a98e94852625a5f511a136b61f78c/zgw-consumers-0.33.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-29 15:27:37",
    "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.21994s