Skip to main content

Modify Python Built-in Types

Project description

This is a library written in pure python that allows you to modify the python built-in types easily. For example:

`python import btm btm.addattr(int, "lol", 10) print((1).lol) # Output: 10 `

How this works!?

  • no C extensions, only pure python

  • no preprocessors

Using the native library ctypes: ctypes.pythonapi._PyObject_GetDictPtr do the trick.

Installation

The simpliest way is using [pip](https://github.com/pypa/pip)

`bash pip install btmod `

or from github:

`bash git clone https://github.com/nacho00112/btm cd btm python3 setup.py install `

For test:

`bash python3 test.py `

Documentation

The documentation is available in [The btm documentation page](https://github.com/nacho00112/btm/tree/main/docs/index.md)

Contribution

Contributions are welcome, see [CONTRIBUTE.md](https://github.com/nacho00112/btm/tree/main/CONTRIBUTE.md) for more information.

For bugs, questions, suggestions etc.

Go to [issues](https://github.com/nacho00112/btm/issues).

Contact

Creators

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

btmod-1.0.1.tar.gz (5.3 kB view details)

Uploaded Source

File details

Details for the file btmod-1.0.1.tar.gz.

File metadata

  • Download URL: btmod-1.0.1.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.7

File hashes

Hashes for btmod-1.0.1.tar.gz
Algorithm Hash digest
SHA256 2a692dd17f843b237219b80aa7b7e33e5c34c05f5ee2c5ee9e88a984064f5459
MD5 c6d393c1867b9eb469c9c62eb41d51be
BLAKE2b-256 1eb5c82ebc072f731cfbcb231489f14bb68a5c4cc9c8feac78a6925a0ba42ded

See more details on using hashes here.

Supported by

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