pybasics - 0.3
Basic utils in Python.
Install
pip3 install pybasics
Examples
# Read/Write text files
from pybasics import read_file
from pybasics import write_file
str_data = read_file('data.dat', split=False)
write_file('data.dat', str_data, mode='w', join=False)
# Read/Wite json files and pretty print
from pybasics import read_json
from pybasics import write_json
from pybasics import pretty_json
json_data = read_json('data.json')
pretty_json(json_data)
write_json('data.json', json_data)
# Read/Write pickle binary files
from pybasics import read_pickle
from pybasics import write_pickle
pickle_data = read_pickle('data.pickle')
write_pickle('data.pickle', pickle_data)
# Get list of subdirectories in path
from pybasics import list_dir
subdirs = list_dir('.')
# Get filename with most recent modification in path
from pybasics import last_file
lastfile = last_file('.')
# Requests
from pybasics import try_except
from pybasics import webcheck
url = 'https://google.com'
if webcheck(url):
# Run your code
pass
data = try_except(url)
# Mongodb
from pybasics import mgdb
from pybasics import mgcol
mydb = mgcol('dbname', create=False, port=27017)
mycol = mgcol('dbname', 'colname', create=False, port=27017)
Metadata
Release files for pybasics 0.3.3
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 |
|---|---|---|---|---|
| pybasics-0.3.3.tar.gz | 17.7 kB | Without provenance | Details for pybasics-0.3.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pybasics-0.3.3-py3-none-any.whl | Python 3 | none | any | Details for pybasics-0.3.3-py3-none-any.whl |
Total release size: 35.5 kB
Release files / pybasics-0.3.3.tar.gz
| Download URL | pybasics-0.3.3.tar.gz |
|---|---|
| Size | 17.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
da16b7f33a41eaf5189069e311864662808ecd460b153435c0da2990c3b74c4b
|
|
BLAKE2b-256 checksum How to use checksums |
fe909435b77731ddfdd2e1727e24e577e91f841c49c7eaf36da23f473d0d3d30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/8.6.1 pkginfo/1.8.2 requests/2.32.3 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.2
|
Release files / pybasics-0.3.3-py3-none-any.whl
| Download URL | pybasics-0.3.3-py3-none-any.whl |
|---|---|
| Size | 17.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ae72f7d9b324f59fec02f783127a65a05f56a78047be492b5d68adb252de7cf8
|
|
BLAKE2b-256 checksum How to use checksums |
7310c57871c577bf873b6f7c81d5362666e084cf7f23a10d689855836474bfb3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/8.6.1 pkginfo/1.8.2 requests/2.32.3 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.2
|
Security for pybasics 0.3.3
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.