Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
.. 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.
: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::
ape-pie <https://pypi.org/project/ape-pie/>
_ API client adapter.. code-block:: bash
pip install zgw-consumers
2. Add zgw_consumers
and simple_certmanager
to the INSTALLED_APPS
setting.
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/
FAQs
Configuration for service (OpenAPI 3 or other) consumers
We found that zgw-consumers demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.