Computing Toolbox for daily computations
Project description
Computing Toolbox for Python
This is a library aiming to help programmers to sort every day tasks easily. This library contains:
- gcp
- secret-manager utils to access secret values
- gcp-storage utils to check if a file exists in Google Cloud or get a list of files in a bucket
- jsonl class able to read and write json line file very quickly
- http-request class able to get html files easily
- async-http-request class able to get multiple files easily
- utils
- deep_get function able to get dynamically values from a dictionary
- split function able to split a given interval of size n in m parts
Installation
pip install computing-toolbox
Usage
from computing_toolbox.jsonl import Jsonl
#read whole file
data0 = [x for x in Jsonl("/path/to/file")]
#alternative to read
data1 = list(Jsonl("/path/to/file"))
#read 100 rows after row 20
data2 = [x for x in Jsonl("/path/to/file", offset=20, limit=100)]
#write objects
data3=[{"name":"Newton"}, {"name":"Galileo"}]
Jsonl("/path/to/file","w").write(data3)
If the file is located in the cloud,
you only need to configure your environment
Jsonl class will handle it for aws, gcp, etc.
Jsonl can handle .zip or .gz files automatically
you only need to specify the right extension in the path
Install CLI tools
pip install .
Author
Pedro Mayorga.
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 computing-toolbox-1.4.2.tar.gz.
File metadata
- Download URL: computing-toolbox-1.4.2.tar.gz
- Upload date:
- Size: 26.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab986676c5bff88b699e7f41fc4ec1599388d261b20a82b579c684f211ec859b
|
|
| MD5 |
529758d7173d4b04bca60854b346a6ed
|
|
| BLAKE2b-256 |
9e7a119980a15b5039db84f82575958ee879a67d35d5a2290c77bd0cd5b353f4
|
File details
Details for the file computing_toolbox-1.4.2-py3-none-any.whl.
File metadata
- Download URL: computing_toolbox-1.4.2-py3-none-any.whl
- Upload date:
- Size: 33.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4da4a29ee502e1714c8f9a11a82f9ff144ad2ff1917733291e6e71a6910da22
|
|
| MD5 |
cf740ed60c91b9953f3082d9bac520c2
|
|
| BLAKE2b-256 |
58a1cc65b6cffef2c9f25556ffa86a1ffea32c184e7787aa1bb0ad2234ad34ff
|