Extension of Python Language
Project description
extepy: Extension of Python Language
Documentation
Docs: https://extepy.github.io
Install
It can be installed with pip.
pip install --upgrade extepy
It works in both Python 2 and Python 3.
Features
Extension of hashlib
extepy.filehash(obj, method="sha256", batchsize=4096)computes the hash value of a file.
Example:
from extepy import filehash
filehash("test.txt")
Extension of importlib
extepy.reload(obj, update_global=True, update_local=True)provides advanced module and object reloading capabilities for Python, so that developer can modify code without restarting the interpreter.
This function solves key limitations of Python's built-in reloading functionality by:
- Supporting all import styles:
import X,import A as X,from A import X, andfrom A import B as X; - Automatically updating references without requiring reassignment;
- Offering granular control over namespace updates (global and/or local namespace).
Examples: Reload modules and objects.
from mymodule import myfunction
# ... modify myfunction() in mymodule.py ...
from extepy import reload
reload(myfunction) # reload function
from mymodule import myfunction as myfunction1
# ... modify myfunction() in mymodule.py ...
from extepy import reload
reload(myfunction1) # reload function alias
import mymodule
# ... modify mymodule.py ...
from extepy import reload
reload(mymodule) # reload module
reload("mymodule") # reload module by module name
import mymodule as mymodule1
# ... modify mymodule.py ...
from extepy import reload
reload(mymodule1) # reload module alias
from extepy import reload
from mymodule import myfunction as myfunction1, myfunction as myfunction2
# ... modify myfunction() in mymodule.py ...
reload(myfunction1) # update both myfunction1 and myfunction2
Examples: Update selective namespaces
from extepy import reload
myfunction = None # global reference
def f():
global myfunction
from mymodule import myfunction
# ... modify myfunction() in mymodule.py ...
reload(myfunction, update_local=False) # update global namespace only
from extepy import reload
def f():
from mymodule import myfunction
# ... modify myfunction() in mymodule.py ...
reload(myfunction, update_global=False) # update the local namespace only
Project details
Release history Release notifications | RSS feed
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 extepy-1.0.0.tar.gz.
File metadata
- Download URL: extepy-1.0.0.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5f344e4655ef512b65cca3c7dd072021feaf4431315c60298bf1108b719080f
|
|
| MD5 |
ea30fed8c01a1f681644fee5b16d2a0b
|
|
| BLAKE2b-256 |
9e0da19b8792f6ee493c7ec3ffcccb195b41b4fc50bf9f4604be6fbbe0862bf2
|
Provenance
The following attestation bundles were made for extepy-1.0.0.tar.gz:
Publisher:
publish.yml on extepy/extepydev
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
extepy-1.0.0.tar.gz -
Subject digest:
d5f344e4655ef512b65cca3c7dd072021feaf4431315c60298bf1108b719080f - Sigstore transparency entry: 343686311
- Sigstore integration time:
-
Permalink:
extepy/extepydev@3505bf6f3ec81e19ae25f720d72c8c95016a1842 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/extepy
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3505bf6f3ec81e19ae25f720d72c8c95016a1842 -
Trigger Event:
release
-
Statement type:
File details
Details for the file extepy-1.0.0-py3-none-any.whl.
File metadata
- Download URL: extepy-1.0.0-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4b17ba7c2478a0ddac3e56ef06f6d23fec7f5635241014540d19868a11dc845
|
|
| MD5 |
d6b79d330801bfa4495ca4cc95013157
|
|
| BLAKE2b-256 |
857138ecea96f5828afd4adac2d095f012773c35d036e5735ca284ea9ebdeb06
|
Provenance
The following attestation bundles were made for extepy-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on extepy/extepydev
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
extepy-1.0.0-py3-none-any.whl -
Subject digest:
b4b17ba7c2478a0ddac3e56ef06f6d23fec7f5635241014540d19868a11dc845 - Sigstore transparency entry: 343686322
- Sigstore integration time:
-
Permalink:
extepy/extepydev@3505bf6f3ec81e19ae25f720d72c8c95016a1842 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/extepy
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@3505bf6f3ec81e19ae25f720d72c8c95016a1842 -
Trigger Event:
release
-
Statement type: