The bidirectional mapping library for Python.
Go to file
jab 0f8897e926 prepare for v0.15.0 release 2018-03-29 10:11:32 +07:00
_static docs tweaks and fixes 2018-03-28 09:20:12 +07:00
bidict revert back to izip, don't assume pkg_resources available, docs and code tweaks 2018-03-26 20:04:53 +08:00
docs docs tweaks 2018-03-28 09:49:22 +07:00
tests revert back to izip, don't assume pkg_resources available, docs and code tweaks 2018-03-26 20:04:53 +08:00
.coveragerc switch to codecov for automatic combining of coverage reports 2017-11-20 13:28:38 -05:00
.editorconfig refactor, tests + docs improvements 2015-04-27 11:08:27 -04:00
.gitignore improve hypothesis tests, use of setuptools_scm and linting 2018-02-26 10:44:21 +11:00
.pre-commit-config.yaml improve BidirectionalMapping.__subclasshook__, .compat, .util->._util, docs, tests, lint 2018-03-01 14:18:39 +11:00
.pylintrc improve hypothesis tests, use of setuptools_scm and linting 2018-02-26 10:44:21 +11:00
.travis.yml more travis cleanups 2018-03-27 16:40:43 +07:00
CHANGELOG.rst prepare for v0.15.0 release 2018-03-29 10:11:32 +07:00
CODE_OF_CONDUCT.rst more API and code improvements 2017-11-19 22:24:08 -05:00
CONTRIBUTING.rst docs tweaks and fixes 2018-03-28 09:20:12 +07:00
LICENSE change license to MPLv2 2017-03-15 16:43:05 -04:00
LICENSE_HEADER happy 2018 2017-12-31 22:51:19 -05:00
MANIFEST.in alphabetize MANIFEST.in 2018-01-15 20:39:20 -05:00
PYPI_DOWNLOAD_STATS.rst various code and CI improvements + dependency updates (#42) 2017-11-16 15:44:51 -05:00
README.rst docs tweaks 2018-03-04 14:16:05 +11:00
appveyor.yml test python 2.7 on appveyor instead of 3.5 2018-02-19 13:57:41 +11:00
build-docs.sh docs tweaks and fixes 2018-03-28 09:20:12 +07:00
pytest.ini squashed changes for 0.13.0 2017-01-09 10:37:31 -05:00
setup.cfg code and documentation improvements 2018-02-19 13:40:01 +11:00
setup.py improve hypothesis tests, use of setuptools_scm and linting 2018-02-26 10:44:21 +11:00
tox.ini various code and CI improvements + dependency updates (#42) 2017-11-16 15:44:51 -05:00

README.rst

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

bidict
======

Efficient, Pythonic bidirectional map implementation and related functionality.

.. image:: ./_static/logo.png
    :target: https://bidict.readthedocs.io/
    :alt: bidict logo


Status
------

.. Hide until https://github.com/badges/shields/issues/716 is fixed
.. .. image:: https://img.shields.io/pypi/dm/bidict.svg
..     :target: https://pypi.python.org/pypi/bidict
..     :alt: Downloads per month

.. image:: https://img.shields.io/pypi/v/bidict.svg
    :target: https://pypi.python.org/pypi/bidict
    :alt: Latest release

.. image:: https://img.shields.io/readthedocs/bidict/master.svg
    :target: https://bidict.readthedocs.io/en/master/
    :alt: Documentation

.. image:: https://api.travis-ci.org/jab/bidict.svg?branch=master
    :target: https://travis-ci.org/jab/bidict
    :alt: Travis-CI build status

.. image:: https://ci.appveyor.com/api/projects/status/gk133415udncwto3/branch/master?svg=true
    :target: https://ci.appveyor.com/project/jab/bidict
    :alt: AppVeyor (Windows) build status

.. image:: https://codecov.io/gh/jab/bidict/branch/master/graph/badge.svg
    :target: https://codecov.io/gh/jab/bidict
    :alt: Test coverage

.. image:: https://api.codacy.com/project/badge/Grade/6628756a73254cd895656348236833b8
    :target: https://www.codacy.com/app/jab/bidict
    :alt: Codacy grade

.. Hide to reduce clutter
.. .. image:: https://img.shields.io/pypi/pyversions/bidict.svg
..     :target: https://pypi.python.org/pypi/bidict
..     :alt: Supported Python versions
..
.. .. image:: https://img.shields.io/pypi/implementation/bidict.svg
..     :target: https://pypi.python.org/pypi/bidict
..     :alt: Supported Python implementations
..
.. .. image:: https://img.shields.io/badge/lgtm-👍-blue.svg
..     :target: https://lgtm.com/projects/g/jab/bidict/
..     :alt: LGTM

.. image:: https://img.shields.io/pypi/l/bidict.svg
    :target: https://raw.githubusercontent.com/jab/bidict/master/LICENSE
    :alt: License


Bidict:
^^^^^^^

- is in use by several teams at Google, Venmo, Bank of America Merrill Lynch,
  Two Sigma, and many others,
- has carefully designed APIs for
  safety, simplicity, flexibility, and ergonomics,
- is CPython-, PyPy-, Python 2-, and Python 3-compatible,
- has extensive `test coverage <https://codecov.io/gh/jab/bidict>`_,
  including property-based tests and benchmarks,
  which are run continuously on all supported Python versions and OSes,
- integrates with Pythons collections interfaces and abstract base classes,
- has mature, well-factored, well-documented code.


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

``pip install bidict``


Quick Start
-----------

    >>> from bidict import bidict
    >>> element_by_symbol = bidict({'H': 'hydrogen'})
    >>> element_by_symbol['H']
    'hydrogen'
    >>> element_by_symbol.inv['hydrogen']
    'H'


For more usage documentation,
head to the :doc:`intro` [#fn-intro]_
and proceed from there.


Community and Support
---------------------

.. image:: https://img.shields.io/badge/chat-on%20gitter-5AB999.svg?logo=gitter-white
    :target: https://gitter.im/jab/bidict
    :alt: Chat

If you are thinking of using bidict in your work,
or if you have any questions, comments, or suggestions,
I'd love to know about your use case
and provide as much support for it as possible.

Please feel free to leave a message in the
`chatroom <https://gitter.im/jab/bidict>`_
or to open a new issue on GitHub.
You can search through
`existing issues <https://github.com/jab/bidict/issues>`_
before creating a new one
in case your questions or concerns have been adressed there already.


Notice of Usage
---------------

If you use bidict,
and especially if your usage or your organization is significant in some way,
please let me know.

You can:

- quickly +1 `this issue <https://github.com/jab/bidict/issues/62>`_
- create your own `dedicated issue <https://github.com/jab/bidict/issues/new?title=Notice+of+Usage&body=I+am+using+bidict+for...>`_
- leave a message in the `chat room <https://gitter.im/jab/bidict>`_
- `email me <mailto:jab@math.brown.edu?subject=bidict&body=I%20am%20using%20bidict%20for...>`_


Changelog
---------

See the :doc:`changelog` [#fn-changelog]_
for a history of notable changes to bidict.


.. .. include:: release-notifications.rst.inc
.. duplicate rather than `include` release-notifications so it renders on GitHub:

Release Notifications
---------------------

.. image:: https://img.shields.io/badge/Sibbell-follow-40263B.svg
    :target: https://sibbell.com/github/jab/bidict/releases/
    :alt: Follow on Sibbell


Tip: `Follow bidict on Sibbell <https://sibbell.com/github/jab/bidict/releases/>`_
to be notified when a new version of bidict is released.


Learning from bidict
--------------------

One of the most rewarding things about bidict
is the outsized amount of advanced Python
it covers in light of its small codebase.

Check out :doc:`learning-from-bidict` [#fn-learning]_
if you're interested in learning more.


Contributing
------------

Bidict is currently a one-person operation
maintained on a voluntary basis
with no other sponsorship.
Your help would be most welcome!


.. adding this label causes the warning
..   home.rst:179: WARNING: duplicate label reviewers-wanted, other instance in index.rst
.. but removing it breaks links to it from other docs (e.g. learning-from-bidict.rst)

.. _reviewers-wanted:

Reviewers Wanted!
^^^^^^^^^^^^^^^^^

One of the most valuable ways to contribute to bidict
and to :doc:`explore some advanced Python <learning-from-bidict>`
while you're at it
is to review bidict's relatively small codebase.

Please create an issue or pull request with any improvements you'd propose
or any other results you found.
(Submitting a "Nothing-to-merge" PR with feedback in inline code comments or a
`Review results <https://github.com/jab/bidict/issues/new?title=Review+results>`_
issue both work well.)

.. The __ in `this issue <...>`__ below is to avoid the warning Sphinx emits
.. ("Duplicate explicit target name")
.. caused by the other `this issue <...>`_ link above. See:
.. https://github.com/sphinx-doc/sphinx/issues/3921#issuecomment-315581557

You can also
+1 `this issue <https://github.com/jab/bidict/issues/63>`__
to sign up to give feedback on future proposed changes
that are in need of a reviewer.


Becoming a Sponsor
^^^^^^^^^^^^^^^^^^

If bidict has helped you accomplish your work,
especially work you've been paid for,
please consider supporting bidict's continued maintenance and development
financially if possible, and/or ask your organization to do the same.

.. image:: https://raw.githubusercontent.com/jab/bidict/master/_static/support-on-gumroad.png
    :target: https://gumroad.com/l/bidict
    :alt: Support bidict


Finding Documentation
---------------------

If you're viewing this on `<https://bidict.readthedocs.io>`_,
note that multiple versions of the documentation are available,
and you can choose a different version using the popup menu at the bottom-right.
Please make sure you're viewing the version of the documentation
that corresponds to the version of bidict you'd like to use.

If you're viewing this on GitHub, PyPI, or some other place
that can't render and link this documentation properly
and are seeing broken links,
try these alternate links instead:

.. [#fn-intro] `<docs/intro.rst>`_ | `<https://bidict.readthedocs.io/intro.html>`_

.. [#fn-changelog] `<CHANGELOG.rst>`_ | `<https://bidict.readthedocs.io/changelog.html>`_

.. [#fn-learning] `<docs/learning-from-bidict.rst>`_ | `<https://bidict.readthedocs.io/learning-from-bidict.html>`_