Skip to main content

Python 2 performance patches: decimal to cdecimal, json to ujson for psycopg2

Project description

decimal-monkeypatch

A Python module based on autowrapt for:

  • Interpreter-wide monkey patching slow decimal module to cdecimal on Python 2 with preservation of the functionality of the boto lib.
  • psycopg2 json to ujson replacement
  • Custom deepcopy for boto.dynamodb2.items. This patch can give huge performance benefits if you know expected data structure.
Usage

pip install decimal-monkeypatch

  • set AUTOWRAPT_BOOTSTRAP=decimal env variable for decimal patch activation
  • set AUTOWRAPT_BOOTSTRAP=psycopg2 env variable for psycopg2 patch activation
  • set AUTOWRAPT_BOOTSTRAP=dynamodb env variable for dynamodb patch activation
  • set AUTOWRAPT_BOOTSTRAP=decimal,psycopg2,dynamodb for all at once
Additional reading
WARNING

Tested on only this configuration:
Python 2.7.12+
boto 2.48.0
m3-cdecimal 2.3
psycopg2-binary 2.7.4
ujson 1.35

Project details


Download files

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

Source Distribution

decimal-monkeypatch-0.4.1.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

decimal_monkeypatch-0.4.1-py2-none-any.whl (8.3 kB view details)

Uploaded Python 2

File details

Details for the file decimal-monkeypatch-0.4.1.tar.gz.

File metadata

  • Download URL: decimal-monkeypatch-0.4.1.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.0 CPython/2.7.12

File hashes

Hashes for decimal-monkeypatch-0.4.1.tar.gz
Algorithm Hash digest
SHA256 7dc4f26aab4ddc6da6be6eebcefaee65ebcc340819e5c8834519ecb01ec54c11
MD5 d5df2f04c4a30ef44d8ce2f206fcf88e
BLAKE2b-256 52f382c34928b4d554dcea49d346bc99ca622b928721bcca945558e35c8b37e6

See more details on using hashes here.

File details

Details for the file decimal_monkeypatch-0.4.1-py2-none-any.whl.

File metadata

  • Download URL: decimal_monkeypatch-0.4.1-py2-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.0 CPython/2.7.12

File hashes

Hashes for decimal_monkeypatch-0.4.1-py2-none-any.whl
Algorithm Hash digest
SHA256 fc8ff696982cb293b17640019d1a703ffb52553d4217e9067cfe54010ed1168a
MD5 955f4bad626f383d3ce88d976ae89284
BLAKE2b-256 e610f3d39475db2da8c9b9a1575b03d881c7deb78ecb42dd595962f166f5bb6f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page