Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

One-to-One mapping with MutableSet interface and directional MutableMapping facets.

Project Description

otomap provides a one-to-one mapping abstraction, presented with a MutableSet interface of (left, right) entries. An OTOMap instance also has left and right facet attributes which both provide MutableMapping interfaces with complementary directionality.


>>> from otomap import OTOMap
>>> oto = OTOMap()
>>> oto.add(('foo', 'bar'))
>>> ('foo', 'bar') in oto
>>> list(oto)
[('foo', 'bar')]
>>> oto.left['foo']
>>> oto.right['bar']
>>> oto.left['X'] = 'bar'
>>> list(oto)
[('X', 'bar')]
>>> del oto.right['bar']
>>> oto.left.items()

Release History

This version
History Node

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(4.2 kB) Copy SHA256 Hash SHA256
Source None Jul 10, 2012

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting