This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Compact representation of fixed width numeric values

Project Description

named_bitfield lets you define fixed width bit fields within an integer, and address those fields as class attributes, while still providing access to the backing integer representation. The original use case for this is “intellignet IDs”. Essentially, this is a unique numeric id, sutiable for use as a database primary key, which encodes some information about the object it identifies. Obviously, this should be immutable information so your IDs don’t change or (worse) get out of sync with reality. Some suggestions are the object type, the create time, or the data source. Saving a few bits for a serial counter is also advisable, as timestamps aren’t reliable as unique ids.

Release History

Release History

This version
History Node

0.1.0

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
named_bitfield-0.1.0.tar.gz (4.1 kB) Copy SHA256 Checksum SHA256 Source Sep 29, 2015

Supported By

WebFaction WebFaction Technical Writing 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 Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting