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.4.2.tar.gz (26.9 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.4.2-py3-none-any.whl (33.4 kB view details)

Uploaded Python 3

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

Hashes for computing-toolbox-1.4.2.tar.gz
Algorithm Hash digest
SHA256 ab986676c5bff88b699e7f41fc4ec1599388d261b20a82b579c684f211ec859b
MD5 529758d7173d4b04bca60854b346a6ed
BLAKE2b-256 9e7a119980a15b5039db84f82575958ee879a67d35d5a2290c77bd0cd5b353f4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for computing_toolbox-1.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d4da4a29ee502e1714c8f9a11a82f9ff144ad2ff1917733291e6e71a6910da22
MD5 cf740ed60c91b9953f3082d9bac520c2
BLAKE2b-256 58a1cc65b6cffef2c9f25556ffa86a1ffea32c184e7787aa1bb0ad2234ad34ff

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