semvec/pypi-packages huggingface dataset:
django-earlyparrot 0.2.9
Use EarlyParrot with Django webhooks and signals
License: MIT
Keywords: python,django,earlyparrot,early,parrot

=============================
django-earlyparrot
=============================

.. image:: https://badge.fury.io/py/django-earlyparrot.svg
    :target: https://badge.fury.io/py/django-earlyparrot

.. image:: https://requires.io/github/exolever/django-earlyparrot/requirements.svg?branch=master
     :target: https://requires.io/github/exolever/django-earlyparrot/requirements/?branch=master
     :alt: Requirements Status

.. image:: https://travis-ci.org/exolever/django-earlyparrot.svg?branch=master
    :target: https://travis-ci.org/exolever/django-earlyparrot

.. image:: https://codecov.io/gh/exolever/django-earlyparrot/branch/master/graph/badge.svg
    :target: https://codecov.io/gh/exolever/django-earlyparrot

.. image:: https://sonarcloud.io/api/project_badges/measure?project=exolever_django-earlyparrot&metric=alert_status
   :target: https://sonarcloud.io/dashboard?id=exolever_django-earlyparrot
  
.. image:: https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat
   :target: https://github.com/exolever/django-earlyparrot/issues
    
.. image:: https://img.shields.io/badge/License-MIT-green.svg
   :target: https://opensource.org/licenses/MIT

Use EarlyParrot with Django webhooks and signals

Quickstart
----------

Install django-earlyparrot::

    pip install django-earlyparrot

Add it to your `INSTALLED_APPS`:

.. code-block:: python

    INSTALLED_APPS = (
        ...
        'referral',
        ...
    )

Running Tests
-------------

Does the code actually work?

::

    source <YOURVIRTUALENV>/bin/activate
    (myenv) $ pip install tox
    (myenv) $ tox

Credits
-------

Tools used in rendering this package:

*  Cookiecutter_
*  `cookiecutter-djangopackage`_

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackage
pydantic-requests 0.1.4
A pydantic integration with requests.
License: MIT
Requires Python: >=3.7,<4.0

[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/dz0ny/pydantic-requests.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/dz0ny/pydantic-requests/context:python)
[![PyPI](https://img.shields.io/pypi/dm/pydantic-requests.svg)](https://pypi.org/project/pydantic-requests/)


# Marriage of Pydantic and Requests

A helper that integrates Pydantic with requests library for seamless access to defined Models.

## Example

```python
from enum import Enum
from pydantic import BaseModel
from pydantic_requests import PydanticSession


class DNSStatus(Enum):
    """DNS OP response codes.
    ref: https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml#dns-parameters-6
    """

    # No Error = 0
    NoError = 0

    # Format Error = 1
    FormErr = 1

    # Server Failure
    ServFail = 2

    # Non-Existent Domain
    NXDomain = 3


class DNSQuery(BaseModel):
    Status: DNSStatus

    class Config:
        """Configure DNS query."""

        allow_mutation = False
        arbitrary_types_allowed = True


with PydanticSession(
    {200: DNSQuery}, headers={"accept": "application/dns-json"}
) as session:
    domain = "dz0ny.xyz"
    res = session.get(
        "https://cloudflare-dns.com/dns-query", params={"name": domain, "type": "NS"}
    )
    res.raise_for_status()
    query: DNSQuery = res.model
    if query.Status == DNSStatus.NXDomain:
        print("Domain is not registered.")
    else:
        print("Domain is registered.")

```