phx-filters-django


Namephx-filters-django JSON
Version 3.1.0 PyPI version JSON
download
home_page
SummaryExtends phx-filters, adding filters useful for Django applications.
upload_time2023-10-06 02:51:20
maintainer
docs_urlNone
author
requires_python>=3.10
licenseMIT License Copyright (c) 2016 EFL Global 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 data validation django filters extension filters
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            .. image:: https://github.com/todofixthis/filters-django/actions/workflows/build.yml/badge.svg
   :target: https://github.com/todofixthis/filters-django/actions/workflows/build.yml
.. image:: https://readthedocs.org/projects/filters/badge/?version=latest
   :target: https://filters.readthedocs.io/en/latest/extension_filters.html#django-filters

Django Filters
==============
Adds `filters`_ for for Django-specific features, including:

- ``filters.ext.Model``: Search for a DB model instance matching the incoming
  value.


Requirements
------------
Django Filters is known to be compatible with the following Python versions:

- 3.12
- 3.11
- 3.10

Only Django v4.x is supported.

.. note::
   I'm only one person, so to keep from getting overwhelmed, I'm only committing
   to supporting the 3 most recent minor versions of Python and the most recent
   major version of Django.  Django Filters may work with versions of Python
   and/or Django not listed here — there just won't be any test coverage to
   prove it 😇

If you encounter any issues, please report them on the project's `Bug Tracker`_,
and be sure to indicate which version of Django you are using.

Installation
------------
This package is an extension for the `Filters library`_, so you can install it
as an extra to ``phx-filters``:

.. code:: bash

   pip install phx-filters[django]

.. important::
   Make sure to install `phx-filters`, **not** `filters`.  I created the latter
   at a previous job years ago, and after I left they never touched that project
   again and stopped responding to my emails — so in the end I had to fork it 🤷

If desired, you can install this package separately.  This allows you to control
the package version separately from ``phx-filters``.

.. code:: bash

   pip install phx-filters-django


Running Unit Tests
------------------
Install the package with the ``test-runner`` extra to set up the necessary
dependencies, and then you can run the tests with the ``tox`` command::

   pip install -e .[test-runner]
   tox -p

To run tests in the current virtualenv::

   python manage.py test

Documentation
-------------
Documentation is available on `ReadTheDocs`_.

Source files for this project's documentation can be found in the
`phx-filters repo`_.

Releases
--------
Steps to build releases are based on `Packaging Python Projects Tutorial`_

.. important::

   Make sure to build releases off of the ``main`` branch, and check that all
   changes from ``develop`` have been merged before creating the release!

1. Build the Project
~~~~~~~~~~~~~~~~~~~~
#. Install extra dependencies (you only have to do this once)::

    pip install -e '.[build-system]'

#. Delete artefacts from previous builds, if applicable::

    rm dist/*

#. Run the build::

    python -m build

#. The build artefacts will be located in the ``dist`` directory at the top
   level of the project.

2. Upload to PyPI
~~~~~~~~~~~~~~~~~
#. `Create a PyPI API token`_ (you only have to do this once).
#. Increment the version number in ``pyproject.toml``.
#. Check that the build artefacts are valid, and fix any errors that it finds::

    python -m twine check dist/*

#. Upload build artefacts to PyPI::

    python -m twine upload dist/*


3. Create GitHub Release
~~~~~~~~~~~~~~~~~~~~~~~~
#. Create a tag and push to GitHub::

    git tag <version>
    git push

   ``<version>`` must match the updated version number in ``pyproject.toml``.

#. Go to the `Releases page for the repo`_.
#. Click ``Draft a new release``.
#. Select the tag that you created in step 1.
#. Specify the title of the release (e.g., ``Django Filters v1.2.3``).
#. Write a description for the release.  Make sure to include:
   - Credit for code contributed by community members.
   - Significant functionality that was added/changed/removed.
   - Any backwards-incompatible changes and/or migration instructions.
   - SHA256 hashes of the build artefacts.
#. GPG-sign the description for the release (ASCII-armoured).
#. Attach the build artefacts to the release.
#. Click ``Publish release``.

.. _Bug Tracker: https://github.com/todofixthis/filters-django/issues
.. _Create a PyPI API token: https://pypi.org/manage/account/token/
.. _filters: http://filters.readthedocs.io/
.. _Filters library: https://pypi.python.org/pypi/phx-filters
.. _Packaging Python Projects Tutorial: https://packaging.python.org/en/latest/tutorials/packaging-projects/
.. _phx-filters repo: https://github.com/todofixthis/filters/blob/develop/docs/extension_filters.rst
.. _ReadTheDocs: https://filters.readthedocs.io/en/latest/extension_filters.html#django-filters
.. _Releases page for the repo: https://github.com/todofixthis/filters-django/releases
.. _tox: https://tox.readthedocs.io/

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "phx-filters-django",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "data validation,django,filters,extension filters",
    "author": "",
    "author_email": "Phoenix Zerin <phx@phx.nz>",
    "download_url": "https://files.pythonhosted.org/packages/de/cb/af3bd2a5340f34b9d21ab82fd2c0e295d50aab7b00b5f0c5e5cef3600472/phx-filters-django-3.1.0.tar.gz",
    "platform": null,
    "description": ".. image:: https://github.com/todofixthis/filters-django/actions/workflows/build.yml/badge.svg\n   :target: https://github.com/todofixthis/filters-django/actions/workflows/build.yml\n.. image:: https://readthedocs.org/projects/filters/badge/?version=latest\n   :target: https://filters.readthedocs.io/en/latest/extension_filters.html#django-filters\n\nDjango Filters\n==============\nAdds `filters`_ for for Django-specific features, including:\n\n- ``filters.ext.Model``: Search for a DB model instance matching the incoming\n  value.\n\n\nRequirements\n------------\nDjango Filters is known to be compatible with the following Python versions:\n\n- 3.12\n- 3.11\n- 3.10\n\nOnly Django v4.x is supported.\n\n.. note::\n   I'm only one person, so to keep from getting overwhelmed, I'm only committing\n   to supporting the 3 most recent minor versions of Python and the most recent\n   major version of Django.  Django Filters may work with versions of Python\n   and/or Django not listed here \u2014 there just won't be any test coverage to\n   prove it \ud83d\ude07\n\nIf you encounter any issues, please report them on the project's `Bug Tracker`_,\nand be sure to indicate which version of Django you are using.\n\nInstallation\n------------\nThis package is an extension for the `Filters library`_, so you can install it\nas an extra to ``phx-filters``:\n\n.. code:: bash\n\n   pip install phx-filters[django]\n\n.. important::\n   Make sure to install `phx-filters`, **not** `filters`.  I created the latter\n   at a previous job years ago, and after I left they never touched that project\n   again and stopped responding to my emails \u2014 so in the end I had to fork it \ud83e\udd37\n\nIf desired, you can install this package separately.  This allows you to control\nthe package version separately from ``phx-filters``.\n\n.. code:: bash\n\n   pip install phx-filters-django\n\n\nRunning Unit Tests\n------------------\nInstall the package with the ``test-runner`` extra to set up the necessary\ndependencies, and then you can run the tests with the ``tox`` command::\n\n   pip install -e .[test-runner]\n   tox -p\n\nTo run tests in the current virtualenv::\n\n   python manage.py test\n\nDocumentation\n-------------\nDocumentation is available on `ReadTheDocs`_.\n\nSource files for this project's documentation can be found in the\n`phx-filters repo`_.\n\nReleases\n--------\nSteps to build releases are based on `Packaging Python Projects Tutorial`_\n\n.. important::\n\n   Make sure to build releases off of the ``main`` branch, and check that all\n   changes from ``develop`` have been merged before creating the release!\n\n1. Build the Project\n~~~~~~~~~~~~~~~~~~~~\n#. Install extra dependencies (you only have to do this once)::\n\n    pip install -e '.[build-system]'\n\n#. Delete artefacts from previous builds, if applicable::\n\n    rm dist/*\n\n#. Run the build::\n\n    python -m build\n\n#. The build artefacts will be located in the ``dist`` directory at the top\n   level of the project.\n\n2. Upload to PyPI\n~~~~~~~~~~~~~~~~~\n#. `Create a PyPI API token`_ (you only have to do this once).\n#. Increment the version number in ``pyproject.toml``.\n#. Check that the build artefacts are valid, and fix any errors that it finds::\n\n    python -m twine check dist/*\n\n#. Upload build artefacts to PyPI::\n\n    python -m twine upload dist/*\n\n\n3. Create GitHub Release\n~~~~~~~~~~~~~~~~~~~~~~~~\n#. Create a tag and push to GitHub::\n\n    git tag <version>\n    git push\n\n   ``<version>`` must match the updated version number in ``pyproject.toml``.\n\n#. Go to the `Releases page for the repo`_.\n#. Click ``Draft a new release``.\n#. Select the tag that you created in step 1.\n#. Specify the title of the release (e.g., ``Django Filters v1.2.3``).\n#. Write a description for the release.  Make sure to include:\n   - Credit for code contributed by community members.\n   - Significant functionality that was added/changed/removed.\n   - Any backwards-incompatible changes and/or migration instructions.\n   - SHA256 hashes of the build artefacts.\n#. GPG-sign the description for the release (ASCII-armoured).\n#. Attach the build artefacts to the release.\n#. Click ``Publish release``.\n\n.. _Bug Tracker: https://github.com/todofixthis/filters-django/issues\n.. _Create a PyPI API token: https://pypi.org/manage/account/token/\n.. _filters: http://filters.readthedocs.io/\n.. _Filters library: https://pypi.python.org/pypi/phx-filters\n.. _Packaging Python Projects Tutorial: https://packaging.python.org/en/latest/tutorials/packaging-projects/\n.. _phx-filters repo: https://github.com/todofixthis/filters/blob/develop/docs/extension_filters.rst\n.. _ReadTheDocs: https://filters.readthedocs.io/en/latest/extension_filters.html#django-filters\n.. _Releases page for the repo: https://github.com/todofixthis/filters-django/releases\n.. _tox: https://tox.readthedocs.io/\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2016 EFL Global  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": "Extends phx-filters, adding filters useful for Django applications.",
    "version": "3.1.0",
    "project_urls": {
        "Changelog": "https://github.com/todofixthis/filters-django/releases",
        "Documentation": "https://filters.readthedocs.io/en/latest/extension_filters.html#django-filters",
        "Issues": "https://github.com/todofixthis/filters-django/issues",
        "Repository": "https://github.com/todofixthis/filters-django"
    },
    "split_keywords": [
        "data validation",
        "django",
        "filters",
        "extension filters"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c51ba00ca219dc12d62be0b92e3397353e4a99f7c250db423a7e6ac016297715",
                "md5": "acb12d4dc34a1e76a86467022eaaadfc",
                "sha256": "f0a6bb9a30511b1310d53003a424b61f4eff7cb45b7d533ef4a0d0a6b835fa88"
            },
            "downloads": -1,
            "filename": "phx_filters_django-3.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "acb12d4dc34a1e76a86467022eaaadfc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 6552,
            "upload_time": "2023-10-06T02:51:17",
            "upload_time_iso_8601": "2023-10-06T02:51:17.855498Z",
            "url": "https://files.pythonhosted.org/packages/c5/1b/a00ca219dc12d62be0b92e3397353e4a99f7c250db423a7e6ac016297715/phx_filters_django-3.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "decbaf3bd2a5340f34b9d21ab82fd2c0e295d50aab7b00b5f0c5e5cef3600472",
                "md5": "4e39feaf314a9161d944cd7f1236b841",
                "sha256": "c5117a0b9d298bd5de5245777701f391ed6720e87703e0e7bb578c2c2b7d2f7d"
            },
            "downloads": -1,
            "filename": "phx-filters-django-3.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "4e39feaf314a9161d944cd7f1236b841",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 8120,
            "upload_time": "2023-10-06T02:51:20",
            "upload_time_iso_8601": "2023-10-06T02:51:20.827084Z",
            "url": "https://files.pythonhosted.org/packages/de/cb/af3bd2a5340f34b9d21ab82fd2c0e295d50aab7b00b5f0c5e5cef3600472/phx-filters-django-3.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-06 02:51:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "todofixthis",
    "github_project": "filters-django",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "phx-filters-django"
}
        
Elapsed time: 0.12547s