Skip to main content

Functions common to several of Brian's Python projects.

Project description

COMMON PYTHON MODULES

Overview

This is a collection of python modules I have created and use in several of my projects. This is just a convenient way for me to keep them in sync across projects. The repo is public so that it can be easily referenced by people using my public projects.

Feedback welcome in the form of a GitHub issue. While I will try to address issues in a timely matter, I only intend to invest in feature requests that align with my project work. Feel free to contribute backward compatible enhancements.

Dependencies

Collectively, these modules rely on the following external libraries:

  • loguru
  • elementpath
  • pytz
  • tzlocal
  • geopy
  • timezonefinder
  • aiohttp
  • boto3
  • requests
  • pycountry
  • html2text
  • packaging
  • pyyaml

Setup

To use this submodule in your GitHub repository:

  1. With your repository's ./src folder as the default location, issue the following command:
git submodule add https://github.com/brian-ruf/common-python.git common
  1. Import the library into your python modules:
from common import * # to import all

# OR

from common import misc # import only one of the modules

Modules

The following modules are exposed to your application via the above instructions:

  • aws.py: Functions for interacting with AWS services
  • country_code_converter.py: Functions for converting between country code formats
  • data.py: Functions for managing and manipulating XML, JSON and YAML content
  • database.py: Functions for interacting with a database. These functions operate the same for all supported databases
  • helper.py: Various helper functions
  • html_to_markdown.py: Functions for converting HTML content to Markdown
  • lfs.py: Functions for interacting with the local file system (LFS)
  • logging.py: Logging configuration and utilities
  • network.py: Functions for network operations
  • stats.py: Statistical helper functions
  • timezone_lookup.py: Functions for timezone lookups based on location
  • xml_formatter.py: Functions for formatting XML content

The following additional modules are present and support the above, but are not directly exposed:

  • database_sqlite3.py: Any database-specific interactions are collected in a single file for that database

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

ruf_common-1.0.2.tar.gz (39.2 kB view details)

Uploaded Source

Built Distribution

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

ruf_common-1.0.2-py3-none-any.whl (42.4 kB view details)

Uploaded Python 3

File details

Details for the file ruf_common-1.0.2.tar.gz.

File metadata

  • Download URL: ruf_common-1.0.2.tar.gz
  • Upload date:
  • Size: 39.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ruf_common-1.0.2.tar.gz
Algorithm Hash digest
SHA256 612ee88dd99210562914dd1be841f965e3a5808f50346aa644b82bd102d671dd
MD5 2e96e31faa27a5caca4d82ce84784102
BLAKE2b-256 a6f29d0ed825daa05d25f7331d2c7afca90ca132c8d7d2f904cd2b1dbd51742c

See more details on using hashes here.

Provenance

The following attestation bundles were made for ruf_common-1.0.2.tar.gz:

Publisher: publish.yml on brian-ruf/ruf-common-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ruf_common-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: ruf_common-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 42.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ruf_common-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c2a935349e75fa7e948aabc6807e592bb919f972f5eff6bd72af1e61fd5c56ce
MD5 2ca90625db2234e2b3de8e6205389198
BLAKE2b-256 c3ffed31aff405cdce0fa89b7c938575839a132c0f60425e595e010b5d67ee46

See more details on using hashes here.

Provenance

The following attestation bundles were made for ruf_common-1.0.2-py3-none-any.whl:

Publisher: publish.yml on brian-ruf/ruf-common-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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