semvec/pypi-packages huggingface dataset:
chargehound 2.5.0
Chargehound Python Bindings
License: MIT

Chargehound python bindings
===========================

|Build Status| |PyPI version|

Installation
------------

``pip install chargehound``

Usage
-----

Import chargehound and set your API key.

.. code:: python

   import chargehound
   chargehound.api_key = '{ YOUR_API_KEY }'

Requests
~~~~~~~~

Every resource is accessed via the Chargehound module.

.. code:: python

   dispute = chargehound.Disputes.submit('dp_123', fields={'customer_name': 'Susie'})

Response
~~~~~~~~

Responses from the API are automatically parsed from JSON and returned
as Python objects.

Responses also include the HTTP status code on the response object as
the status field.

.. code:: python

   dispute = chargehound.Disputes.retrieve('dp_123')

   print dispute.state
   # 'needs_response'
   print dispute.response.status
   # 200

Documentation
-------------

`Disputes <https://www.chargehound.com/docs/api/index.html?python#disputes>`__

`Errors <https://www.chargehound.com/docs/api/index.html?python#errors>`__

Development
-----------

To build and install from the latest source:

.. code:: bash

   $ git clone git@github.com:chargehound/chargehound-python.git
   $ pip install -r dev_requirements.txt

Run tests:

.. code:: bash

   $ python setup.py test

Deployment
----------

If you added a new depency, make sure the change is reflected in the
``requirements.txt`` file (for unit tests), the ``dev_requirements.txt``
file (for module publishers) and the ``setup.py`` file (for module
consumers).

To deploy a new version of the SDK, you will need Pandoc
(http://pandoc.org/) installed. Pandoc will convert the README.md into
the .rst format required for the Python repository. Instructions are
here: http://pandoc.org/installing.html.

Next, install PyPandoc, the Python wrapper for Pandoc, following `these
instructions <https://pypi.python.org/pypi/pypandoc>`__.

The last pre-requisite is
`Twine <https://pypi.python.org/pypi/twine>`__, a utility for
interacting with PyPi.

Once Pandoc, PyPandoc and Twine are installed, you can build and deploy
a new module to PyPi with the following steps:

1. Update the CHANGELOG to describe what feature have been added.
2. Bump the version number in ``chargehound/version.py`` and
   ``setup.py``
3. Rebuild and deploy the package with: ``python setup.py sdist``
4. Upload the distributable to PyPi using:
   ``twine upload dist/{name_of_generated_package}``
5. Confirm the new package version is available at
   https://pypi.python.org/pypi/chargehound

.. |Build Status| image:: https://travis-ci.org/chargehound/chargehound-python.svg?branch=master
   :target: https://travis-ci.org/chargehound/chargehound-python
.. |PyPI version| image:: https://badge.fury.io/py/chargehound.svg
   :target: https://badge.fury.io/py/chargehound
django-postges-lookups-any 0.1.2
Provides =ANY(ARRAY(xxx)) instead of IN (xxx)
License: MIT
Keywords: django-postges-lookups-any

=============================
django-postgres-lookups-any
=============================

.. image:: https://badge.fury.io/py/django-postges-lookups-any.svg
    :target: https://badge.fury.io/py/django-postges-lookups-any

Provides =ANY(ARRAY(xxx)) instead of IN (xxx)

Documentation
-------------

This library is designed for Postgres. It enables developers to cope with problem when Postgres
doesn't use indexes with long `IN ()` statements.

Usually, when you try to do a query:

.. code-block:: sql

    SELECT a.* FROM a
    WHERE a.id NOT IN (
        SELECT b.id FROM b
    )

You expect that it will be used index on a.id. Unfortunately, it doesn't work.

There is a trick to make Postgres do it by rewritten query this way:

.. code-block:: sql

    SELECT a.* FROM a
    WHERE a.id=ANY(ARRAY(SELECT b.id FROM b))

This library allows you to use this statement. Examples:

.. code-block:: python

    """
    SELECT * FROM mymodel WHERE somefield=ANY([1, 2, 3])
    """
    MyModel.objects.filter(somefield__any_arr=[1, 2, 3])

    """
    SELECT * FROM mymodel WHERE somefield=ANY(ARRAY(SELECT somefield FROM modelb))
    """
    subquery = Subquery(model_b__instances.values('somefield'))
    MyModel.objects.filter(somefield__any=subquery)

Quickstart
----------

Install django-postgres-lookups-any::

    pip install django-postges-lookups-any

Add it to your `INSTALLED_APPS`:

.. code-block:: python

    INSTALLED_APPS = (
        ...
        'django_postges_lookups_any',
        ...
    )

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

Does the code actually work?

::

    source <YOURVIRTUALENV>/bin/activate
    (myenv) $ pip install -r requirements_test.txt
    (myenv) $ pytest


Development commands
---------------------

::

    pip install -r requirements_dev.txt

Credits
-------

Tools used in rendering this package:

*  Cookiecutter_
*  `cookiecutter-djangopackage`_

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackage




History
-------

0.1.0 (2021-02-08)
++++++++++++++++++

* First release on PyPI.