Skip to main content

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:

  1. gcp
    1. secret-manager utils to access secret values
    2. gcp-storage utils to check if a file exists in Google Cloud or get a list of files in a bucket
  2. jsonl class able to read and write json line file very quickly
  3. http-request class able to get html files easily
  4. async-http-request class able to get multiple files easily
  5. utils
    1. deep_get function able to get dynamically values from a dictionary
    2. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

computing-toolbox-1.2.5.tar.gz (23.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

computing_toolbox-1.2.5-py3-none-any.whl (28.3 kB view details)

Uploaded Python 3

File details

Details for the file computing-toolbox-1.2.5.tar.gz.

File metadata

  • Download URL: computing-toolbox-1.2.5.tar.gz
  • Upload date:
  • Size: 23.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for computing-toolbox-1.2.5.tar.gz
Algorithm Hash digest
SHA256 4a8ed75678d963fd35bf3aec6cbb3d28bb4c39aedb90474ad98201b41eac90c3
MD5 5ad3aa1d68100361d09f9f3730efbd31
BLAKE2b-256 d60bb481f1b2bf0a79ae2dd4da2cc445373c15a54ed73e3c507f1255bf5508f9

See more details on using hashes here.

File details

Details for the file computing_toolbox-1.2.5-py3-none-any.whl.

File metadata

File hashes

Hashes for computing_toolbox-1.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 e5ce185140340a51319767f4845d424dd01f00408634e4f7add34f2eeb7253f8
MD5 c19c4b7319b23e943ba55d254055b129
BLAKE2b-256 019941ce32aaa00c079ef84a65087d031745b1c9700a91d0d0e17690917bc729

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page