Metadata-Version: 2.1
Name: dephell-specifier
Version: 0.2.2
Summary: Work with version specifiers.
Project-URL: Repository, https://github.com/dephell/dephell_venvs
Author: Gram
Author-email: mail@orsinium.dev
License: MIT
Requires-Python: >=3.6
Keywords: dephell,packaging,versioning,semver,version,maven
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Installation/Setup
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: Unix


Dephell Specifier
-----------------


.. image:: https://travis-ci.org/dephell/dephell_specifier.svg?branch=master
   :target: https://travis-ci.org/dephell/dephell_specifier
   :alt: travis


.. image:: https://ci.appveyor.com/api/projects/status/github/dephell/dephell_specifier?svg=true
   :target: https://ci.appveyor.com/project/orsinium/dephell-specifier
   :alt: appveyor


.. image:: https://img.shields.io/pypi/l/dephell-specifier.svg
   :target: https://github.com/dephell/dephell_specifier/blob/master/LICENSE
   :alt: MIT License


Work with version specifiers.

Supported specifiers:


* `PEP-440 <https://www.python.org/dev/peps/pep-0440/>`_.
* `NPM SemVer <https://github.com/npm/node-semver>`_.
* `Maven <http://maven.apache.org/enforcer/enforcer-rules/versionRanges.html>`_.
* `RubyGems <https://guides.rubygems.org/patterns/>`_

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

Install from `PyPI <https://pypi.org/project/dephell-specifier/>`_\ :

.. code-block:: bash

   python3 -m pip install --user dephell_specifier

Usage
-----

.. code-block:: python

   from dephell_specifier import RangeSpecifier

   '3.4' in RangeSpecifier('*')
   # True

   '3.4' in RangeSpecifier('<=2.7')
   # False

   '3.4' in RangeSpecifier('>2.7')
   # True

   '3.4' in RangeSpecifier('>2.7,<=3.4')
   # True

   '3.4' in RangeSpecifier('<2.7 || >=3.4')
   # True
