eze
A super simple library for common tasks in python 3.
- No extra dependencies required, you can go use
eze.pyand that's it! - Great for scripting something fast.
- You are free to copy implementations for specific functions (see
get_eze).
TODO:
- add examples for each function, and a link to the implementation for usage outside of the lib.
Usage
pip install eze
import eze as e
Strings / JSON & CSV
b64- base 64 encodes to a string (no bytes needed!)b64d- base 64 decodes a string/bytes- to stringb- to bytesregex- match
match = e.regex(r'hello (.*?)', 'hello world') # (' world', (' world'))
json- json encodejsond- json decodecsv- dict/list to csvcsvd- decode a csv file/string into a dict.
IO
write- write something to a fileread- read something from a file
Runtime
eq- checks if two vars/objects/classes are the same in-memory (might be used for something else)stack- gets the stack up to here in a human-readable fashion.dir- shows all of the inherited functions of an object (no need to see__init_subclass__)break- poor man's breakpoint - will exit and print the current variables in a human-readable fashion.@timeitdecorator - prints the seconds it took to run a function.get_time- returns the seconds it took to run a function.
Printing things
pp/pretty_print- pretty print objects/classes/functions.nl/new_line- create a new line string for terminal usagetbl/table- create an ascii table and print it out of lists/generators.diff- show the difference between vars/functions/classes/objects can also be colored.
Imports
import_all- imports the whole directory - good for__init__.pyimport- imports a python file during runtime
module = input('What module do you want?')
e.import(module)
# Use `module` functions
show_loaded- shows the currently loaded modules.
Web
get- GET request to a URL.
Concurrency
together- run a function concurrently.
def fetch_that(url):
print(requests.get(url).text)
# together executes
e.together(fetch_that, ['https://google.com', 'https://facebook.com'], {
'tasks': 4,
'done': done_callback
})
Misc
get_eze- prints out the implementation of a function here for production usage (without extra eze code).disable- disables all of velocity's functions - for production usage.
Metadata
Release files for eze 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| eze-0.0.2.tar.gz | 2.6 kB | Without provenance | Details for eze-0.0.2.tar.gz |
Release files / eze-0.0.2.tar.gz
| Download URL | eze-0.0.2.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4736a116031e0e91c2ae7adc60229fa1428cf0d88725dbf3a15b1f2d23c98bfe
|
|
BLAKE2b-256 checksum How to use checksums |
6ae182a31324f3cc424e7b3bcc691053ba5ea5a0180b86fdb2c474121e101cef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.3
|
Security for eze 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.