libumccr
UMCCR Reusable Python modules
Usage
- Install through
piplike so
pip install libumccr[aws]
- Somewhere in your Python code
from libumccr.aws import libssm
ssm_value = libssm.get_ssm_param("my_param_name")
- Crawling S3 Objects from a Bucket, efficiently!
from libumccr.aws import libs3
bucket="my-bucket"
key_prefix="my_prefix"
key_suffix=".csv"
for obj in libs3.get_matching_s3_objects(bucket, prefix=key_prefix, suffix=key_suffix):
print(f"s3://{bucket}/{obj['Key']}")
Transitive Dependencies
Self Service
- Starting from
v0.4onwards, by default, the libumccr does not mandate any transitive dependencies installation for you. - That is, if you
pip install libumccrthen it just installs the libumccr package itself only. - If you do this, you will have to manage transitive dependencies at your application as end-of-chain requirement as you see fit.
- This depends on which libumccr modules you need to depend on at your code.
- The bare metal libumccr should only have some hundred KB (~180KB) by size. However, in this case, you can only use those modules that leverage built-in Python standard library (that does not require extra 3rd party library). Which might be perfect for use case like libregex - well-known sample ID pattern parser contributed by team member (Alexis). You may contribute here similar and, reuse it at your end...
Feature Flag
- If you would like to have all transitive dependencies requirement along with the libumccr, then do so
pip install libumccr[all]. - For any aws related module usage with boto3 and botocore, then
pip install libumccr[aws]. - Similarly, for gspread, gdrive and Pandas dataframe stuff, then
pip install libumccr[libgdrive]. - Do check out setup.py
extras_requiresections for all available feature flags.
This arrangement is sometime also known as deferring feature flag toggle at runtime requirement. Google for more...
AWS Lambda
- The AWS Lambda runtime for Python environment already contain the boto3 and botocore.
- Hence, if you are bundling your application for AWS Lambda Python runtime environment then you just need to
pip install libumccr. - The AWS Lambda Python runtime is already satisfied the
libumccr[aws]feature requirement, and you can still leverage the libumccr.aws modules with the lowest asset bundle footprint. - In this case, you just put
boto3in your local development environment only; such asreqirements-dev.txtor equivalent.
Development
- Create Python virtual environment
git clone https://github.com/umccr/libumccr.git
cd libumccr
conda activate libumccr
make install all
make check
make test
Metadata
Release files for libumccr 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| libumccr-0.4.1.tar.gz | 18.0 kB | Without provenance | Details for libumccr-0.4.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| libumccr-0.4.1-py3-none-any.whl | Python 3 | none | any | Details for libumccr-0.4.1-py3-none-any.whl |
Total release size: 36.2 kB
Release files / libumccr-0.4.1.tar.gz
| Download URL | libumccr-0.4.1.tar.gz |
|---|---|
| Size | 18.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0c6963bbd164eaf799acdb8cda28ba5b5a49bf06a552978901b49802da4fc5ec
|
|
BLAKE2b-256 checksum How to use checksums |
d96d4a134398b5e27a8116ce6f9ff96419e4c85d28d3500ecc7d9be8219a44e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / libumccr-0.4.1-py3-none-any.whl
| Download URL | libumccr-0.4.1-py3-none-any.whl |
|---|---|
| Size | 18.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
20e06ec4b99ff6d68f9e21b72da10c16e33933314e20f53abe2983d03f3a080e
|
|
BLAKE2b-256 checksum How to use checksums |
857a47ee2eddaacdd6007b60ec0e8447bc2ec9acdd4b2228e066d213311fabde
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Security for libumccr 0.4.1
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.