Skip to main content

reusable

Python reusable code, utility functions and time saver.

Overview

Python reusable library contains a handful of reusable functions and utility class

Install

pip install -U reusable

Usage

Loading Configuration files as class attributes

from reusable import AppConfig
config=AppConfig('config.json')
mykey=config.my_key

Load config file accessible via class methods

from reusable import Config
config=Config('config.json')
mykey=config.get('my_key')

Available functions

  • random_string() : return a random string of specified length and character set
  • print_table() : prints a data table provided as list
  • print_time_taken [decorator] : prints the time of execution of a parameter
  • groupby_count() : groups a given list according the number of times it appears
  • generate_all_datetime_regex : generate the regex for all possible datetime
  • download_file : download a file from the given url
  • is_python3() : check if the interpreter is python v3
  • is_python_above_or_equal() : check if the interpreter is above or equal to the given version
  • check_modules_installed() : check if the given modules are installed
  • random_useragent() : return a random useragent
  • is_valid_json() : checks if given string is valid json
  • headline() : return a formatted string in headline style
  • splash() : return a string with splash style
  • multiline_input() : takes multiline user input
  • get_datadir() : returns the app data folder
  • get_windows_appdata_dir() : similar to get_datadir() but windows only
  • slugify() : Makes slug text from given vlaue
  • float_range() : Returns a iterable of floating range

Metadata

Release files for reusable 0.0.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for reusable 0.0.9
File Size Uploaded Provenance Actions
reusable-0.0.9.tar.gz 9.8 kB Without provenance Details for reusable-0.0.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for reusable 0.0.9
File Interpreter ABI Platform Actions
reusable-0.0.9-py3-none-any.whl Python 3 none any Details for reusable-0.0.9-py3-none-any.whl

Total release size: 22.0 kB

Release files / reusable-0.0.9.tar.gz

Download URL reusable-0.0.9.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f61ec39f9d5f1a9ea600909ffc8eca278732f225a563019bebab9de2cca159dd
BLAKE2b-256 checksum
How to use checksums
8232ef4f120c04f59e5ea9707170532febc2cd62eaea0e55c5ec1b48a1bb91a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

Release files / reusable-0.0.9-py3-none-any.whl

Download URL reusable-0.0.9-py3-none-any.whl
Size 12.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f284656296062bcd32c2bedbe38012e8640d7bbaef30459cf7dd4af166a4d9ba
BLAKE2b-256 checksum
How to use checksums
71dabda19bd4b7f9e89364d59e85465fed537247c88208a8eae6ab50e98fd82c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

Security for reusable 0.0.9

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page