• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

assets/H03-May-2022-8768

bidict/H07-May-2022-1,7641,002

bidict.egg-info/H03-May-2022-283205

docs/H23-Oct-2021-4,3203,012

requirements/H03-May-2022-2723

tests/H03-May-2022-940662

.LICENSE_HEADERH A D23-Oct-2021251 64

.coveragercH A D23-Oct-2021177 1311

.editorconfigH A D23-Oct-2021235 1511

.lgtm.ymlH A D23-Oct-2021148 65

.pre-commit-config.yamlH A D23-Oct-20211.4 KiB5750

.pylintrcH A D23-Oct-2021966 4138

.readthedocs.ymlH A D23-Oct-2021218 1713

CHANGELOG.rstH A D23-Oct-202135.7 KiB1,078786

CODE_OF_CONDUCT.rstH A D23-Oct-20213.2 KiB8365

CONTRIBUTING.rstH A D23-Oct-20216.2 KiB163116

LICENSEH A D23-Oct-202116.3 KiB374293

MANIFEST.inH A D23-Oct-2021682 2927

PKG-INFOH A D23-Oct-20219.3 KiB283205

PYPI_DOWNLOAD_STATS.rstH A D23-Oct-2021680 3126

README.rstH A D23-Oct-20218.1 KiB253178

SECURITY.rstH A D23-Oct-2021134 75

build-docs.shH A D23-Oct-20211.5 KiB6341

codecov.ymlH A D23-Oct-202190 76

mypy.iniH A D23-Oct-2021553 2218

pyproject.tomlH A D23-Oct-2021101 76

pytest.iniH A D23-Oct-2021780 2322

run_tests.pyH A D23-Oct-2021936 3011

setup.cfgH A D23-Oct-20211,021 4236

setup.pyH A D23-Oct-20212.8 KiB8260

tox.iniH A D23-Oct-2021720 3124

README.rst

1.. Forward declarations for all the custom interpreted text roles that
2   Sphinx defines and that are used below. This helps Sphinx-unaware tools
3   (e.g. rst2html, PyPI's and GitHub's renderers, etc.).
4.. role:: doc
5
6.. Use :doc: rather than :ref: references below for better interop as well.
7
8
9bidict
10======
11
12The bidirectional mapping library for Python.
13
14.. image:: https://raw.githubusercontent.com/jab/bidict/main/assets/logo-sm-white-bg.jpg
15   :target: https://bidict.readthedocs.io/
16   :alt: bidict logo
17
18
19Status
20------
21
22.. image:: https://img.shields.io/pypi/v/bidict.svg
23   :target: https://pypi.org/project/bidict
24   :alt: Latest release
25
26.. image:: https://img.shields.io/readthedocs/bidict/main.svg
27   :target: https://bidict.readthedocs.io/en/main/
28   :alt: Documentation
29
30.. image:: https://github.com/jab/bidict/workflows/Tests/badge.svg
31   :target: https://github.com/jab/bidict/actions
32   :alt: GitHub Actions CI status
33
34.. image:: https://codecov.io/gh/jab/bidict/branch/main/graph/badge.svg
35   :target: https://codecov.io/gh/jab/bidict
36   :alt: Test coverage
37
38.. Hide to reduce clutter
39   .. image:: https://img.shields.io/lgtm/alerts/github/jab/bidict.svg
40      :target: https://lgtm.com/projects/g/jab/bidict/
41      :alt: LGTM alerts
42   .. image:: https://bestpractices.coreinfrastructure.org/projects/2354/badge
43      :target: https://bestpractices.coreinfrastructure.org/en/projects/2354
44      :alt: CII best practices badge
45   .. image:: https://img.shields.io/badge/tidelift-pro%20support-orange.svg
46      :target: https://tidelift.com/subscription/pkg/pypi-bidict?utm_source=pypi-bidict&utm_medium=referral&utm_campaign=docs
47      :alt: Paid support available via Tidelift
48   .. image:: https://img.shields.io/pypi/pyversions/bidict.svg
49      :target: https://pypi.org/project/bidict
50      :alt: Supported Python versions
51   .. image:: https://img.shields.io/pypi/implementation/bidict.svg
52      :target: https://pypi.org/project/bidict
53      :alt: Supported Python implementations
54
55.. image:: https://img.shields.io/pypi/l/bidict.svg
56   :target: https://raw.githubusercontent.com/jab/bidict/main/LICENSE
57   :alt: License
58
59.. image:: https://static.pepy.tech/badge/bidict
60   :target: https://pepy.tech/project/bidict
61   :alt: PyPI Downloads
62
63.. image:: https://img.shields.io/badge/GitHub-sponsor-ff69b4
64  :target: https://github.com/sponsors/jab
65  :alt: Sponsor through GitHub
66
67
68bidict:
69^^^^^^^
70
71- has been used for many years by several teams at
72  **Google, Venmo, CERN, Bank of America Merrill Lynch, Bloomberg, Two Sigma,** and many others
73- has carefully designed APIs for
74  **safety, simplicity, flexibility, and ergonomics**
75- is **fast, lightweight, and has no runtime dependencies** other than Python's standard library
76- **integrates natively** with Python’s ``collections.abc`` interfaces
77- provides **type hints** for all public APIs
78- is implemented in **concise, well-factored, pure (PyPy-compatible) Python code**
79  that is **optimized for running efficiently**
80  as well as for **reading and learning** [#fn-learning]_
81- has **extensive docs and test coverage**
82  (including property-based tests and benchmarks)
83  run continuously on all supported Python versions
84
85
86Installation
87------------
88
89``pip install bidict``
90
91
92Quick Start
93-----------
94
95.. code:: python
96
97   >>> from bidict import bidict
98   >>> element_by_symbol = bidict({'H': 'hydrogen'})
99   >>> element_by_symbol['H']
100   'hydrogen'
101   >>> element_by_symbol.inverse['hydrogen']
102   'H'
103
104
105For more usage documentation,
106head to the :doc:`intro` [#fn-intro]_
107and proceed from there.
108
109
110Voluntary Community Support
111---------------------------
112
113.. image:: https://img.shields.io/badge/gitter-chat-5AB999.svg?logo=gitter-white
114   :target: https://gitter.im/jab/bidict
115   :alt: Chat
116
117Please feel free to leave a message in the
118`bidict chatroom <https://gitter.im/jab/bidict>`__
119or open a new issue on GitHub
120for voluntary community support.
121You can search through
122`existing issues <https://github.com/jab/bidict/issues>`__
123before creating a new one
124in case your issue has been addressed already.
125
126
127Enterprise Support
128------------------
129
130.. image:: https://img.shields.io/badge/tidelift-enterprise%20support-orange.svg
131   :target: https://tidelift.com/subscription/pkg/pypi-bidict?utm_source=pypi-bidict&utm_medium=referral&utm_campaign=readme
132   :alt: Enterprise support via Tidelift
133
134Enterprise-level support for bidict can be obtained via the
135`Tidelift subscription <https://tidelift.com/subscription/pkg/pypi-bidict?utm_source=pypi-bidict&utm_medium=referral&utm_campaign=readme>`__.
136
137
138Notice of Usage
139---------------
140
141If you use bidict,
142and especially if your usage or your organization is significant in some way,
143please let me know in any of the following ways:
144
145- `star bidict on GitHub <https://github.com/jab/bidict>`__
146- `create an issue <https://github.com/jab/bidict/issues/new?title=Notice+of+Usage&body=I+am+using+bidict+for...>`__
147- leave a message in the `chat room <https://gitter.im/jab/bidict>`__
148- `email me <mailto:jabronson@gmail.com?subject=bidict&body=I%20am%20using%20bidict%20for...>`__
149
150
151Changelog
152---------
153
154See the :doc:`changelog` [#fn-changelog]_
155for a history of notable changes to bidict.
156
157
158Release Notifications
159---------------------
160
161.. duplicated in CHANGELOG.rst:
162   (would use `.. include::` but GitHub doesn't understand it)
163
164.. image:: https://img.shields.io/badge/libraries.io-subscribe-5BC0DF.svg
165   :target: https://libraries.io/pypi/bidict
166   :alt: Follow on libraries.io
167
168Watch releases
169`on GitHub <https://github.blog/changelog/2018-11-27-watch-releases/>`__ or
170`libraries.io <https://libraries.io/pypi/bidict>`__
171to be notified when new versions of bidict are released.
172
173
174Learning from bidict
175--------------------
176
177One of the best things about bidict
178is that it touches a surprising number of
179interesting Python corners,
180especially given its small size and scope.
181
182Check out :doc:`learning-from-bidict` [#fn-learning]_
183if you're interested in learning more.
184
185
186Contributing
187------------
188
189bidict is currently a one-person operation
190maintained on a voluntary basis.
191
192Your help would be most welcome!
193See the :doc:`contributors-guide` [#fn-contributing]_
194for more information.
195
196
197Sponsoring
198^^^^^^^^^^
199
200.. duplicated in CONTRIBUTING.rst
201   (would use `.. include::` but GitHub doesn't understand it)
202
203.. image:: https://img.shields.io/badge/GitHub-sponsor-ff69b4
204  :target: https://github.com/sponsors/jab
205  :alt: Sponsor through GitHub
206
207Bidict is the product of thousands of hours of my unpaid work
208over the 12+ years I've been maintaining it.
209
210If bidict has helped you accomplish your work,
211especially work you've been paid for,
212it's easy to
213`sponsor me through GitHub <https://github.com/sponsors/jab>`__.
214
215Choose a tier and GitHub handles everything else.
216The sponsorship just goes on your regular GitHub bill;
217there's nothing extra to do.
218You can also sponsor me through
219`Gumroad <https://gumroad.com/l/bidict>`__ or
220`PayPal <https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=jabronson%40gmail%2ecom&lc=US&item_name=Sponsor%20bidict%20(name%20a%20fair%20price)>`__.
221
222Read more about
223`companies supporting open source developers
224<https://www.cognitect.com/blog/supporting-open-source-developers>`__.
225
226
227Finding Documentation
228---------------------
229
230If you're viewing this on `<https://bidict.readthedocs.io>`__,
231note that multiple versions of the documentation are available,
232and you can choose a different version using the popup menu at the bottom-right.
233Please make sure you're viewing the version of the documentation
234that corresponds to the version of bidict you'd like to use.
235
236If you're viewing this on GitHub, PyPI, or some other place
237that can't render and link this documentation properly
238and are seeing broken links,
239try these alternate links instead:
240
241.. [#fn-learning] `<docs/learning-from-bidict.rst>`__ | `<https://bidict.readthedocs.io/learning-from-bidict.html>`__
242
243.. [#fn-changelog] `<CHANGELOG.rst>`__ | `<https://bidict.readthedocs.io/changelog.html>`__
244
245.. [#fn-intro] `<docs/intro.rst>`__ | `<https://bidict.readthedocs.io/intro.html>`__
246
247.. [#fn-contributing] `<docs/contributors-guide.rst>`__ | `<https://bidict.readthedocs.io/contributors-guide.html>`__
248
249
250----
251
252Next: :doc:`intro` [#fn-intro]_
253