Backports for the Python standard library.
Project description
backlib
[!WARNING] The library is in the pre-alpha stage. Bugs may exist!
Key Features
- Provides backports for the standard library;
- Compatible with Python 3.9+;
- Almost dependency-free.
Getting Started
Installation
The library is available as backlib on PyPI:
pip install backlib
Usage
builtins
For more, see the documentation.
from backlib.py310 import builtins
assert issubclass(builtins.EncodingWarning, Warning)
errno
For more, see the documentation.
from backlib.py311 import errno
assert errno.ENOTCAPABLE == 93
io [SOON]
For more, see the documentation.
from backlib.py311 import io
encoding = io.text_encoding(None)
assert encoding == "utf-8"
json
For more, see the documentation.
from backlib.py310 import json
data = json.loads("{\"backlib\": \"pypi\"}")
assert data == {"backlib": "pypi"}
operator
For more, see the documentation.
from backlib.py311 import operator
value = operator.call(abs, -42)
assert value == 42
os
For more, see the documentation.
from backlib.py312 import os
st = os.stat("pyproject.toml")
assert st.st_birthtime_ns > 0
os.path
For more, see the documentation.
from backlib.py313 import os
assert os.path.isreserved("NUL")
stat
For more, see the documentation.
from backlib.py313 import stat
assert stat.SF_SYNTHETIC == 0xC0000000
tomllib
For more, see the documentation.
from backlib.py311 import tomllib
data = tomllib.loads("\"backlib\" = \"pypi\"")
assert data == {"backlib": "pypi"}
License
MIT License, Copyright (c) 2025 Sergei Y. Bogdanov. See LICENSE file.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file backlib-0.2.2.tar.gz.
File metadata
- Download URL: backlib-0.2.2.tar.gz
- Upload date:
- Size: 59.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.2 CPython/3.13.3 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9e09049b351b0535ffc8c8bf95e2f03b5ba50571ca63b9b6723da123c855d85
|
|
| MD5 |
b59eb95a665d892b95d54355e294bad3
|
|
| BLAKE2b-256 |
896b4e5c7d7d5759dd0afc360f45fa69af6000ff743333e1fd82c9301e86a5d3
|
File details
Details for the file backlib-0.2.2-py3-none-any.whl.
File metadata
- Download URL: backlib-0.2.2-py3-none-any.whl
- Upload date:
- Size: 106.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.2 CPython/3.13.3 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6851ca98df9eb7010fa3e7112a7cd99d74e369be7fee710314c40b2a0c5de50a
|
|
| MD5 |
0076e044cbc05531c521c552ce8709a4
|
|
| BLAKE2b-256 |
694c5e25c68653624019b008dcd0bf6863639cac81204481ece6e15737abaf5b
|