This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

unicode_mayo is the mayo in your unicode sandwich. In your development environment, use it as a wrapper around unicode and byte strings to see if they’re accidentally coming in to contact with byte strings. This can help catch unicode encode/decode errors before they happen in production!

unicode_mayo includes two classes: UnicodeSafetyWrapper and BytestringSafetyWrapper. The former is meant to envelope unicode strings, and warns when they come into contact with byte strings; the latter is meant for byte strings, and warns when it comes into contact with unicode. Place these in strategic places (likely in development environments only), like gettext() or all strings from your database.

Installation

Installation via pip:

pip install unicode_mayo

Usage

Something like:

>>> import unicode_mayo
>>> wrapped = unicode_mayo.UnicodeSafetyWrapper(u'safety at last!')
>>> wrapped.encode('utf-8')
'safety at last!'
>>> wrapped + u' woohoo!'
u'safety at last! woohoo!'
>>> wrapped + 'evil bytestring'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/eyalr/personal_work/unicode_mayo/src/unicode_mayo/__init__.py", line 55, in __add__
    _fail_on_bytes(other)
  File "/Users/eyalr/personal_work/unicode_mayo/src/unicode_mayo/__init__.py", line 90, in _fail_on_bytes
    _fail_on_bytes_helper(other)
  File "/Users/eyalr/personal_work/unicode_mayo/src/unicode_mayo/__init__.py", line 81, in _fail_on_bytes_helper
    'Attempted string formatting without decoding utf-8'
TypeError: Attempted string formatting without decoding utf-8
Release History

Release History

1.0.1

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

1.0.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.8.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.7.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.6.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.6.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
unicode_mayo-1.0.1-py2-none-any.whl (5.8 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Mar 6, 2015
unicode_mayo-1.0.1.tar.gz (3.8 kB) Copy SHA256 Checksum SHA256 Source Mar 6, 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