CPP-Utils Python Package
Information
This package was created by starting C ++ methods to incorporate into my python implementations.
To make things easier for me, lightweight public libraries were included (especially to carry out string operations):
- hash-library
- strtk
The following methods have currently been implemented:
- ini_load (flexible and ligthweigh ini to dict parser, Faster Than Configparser)
- eval_type (method to parse strings in python-types e.g. int | bool | timestamp
- simple_hmac (vectorized c++ hmac implementation)
- default_ca_path (python function to find a default ssl / ca certificate path)
In the future the following will be implemented:
- more hash methods
- c++ optimized grep methods
- c++ optimized url-tools methods
Currently, the package was only tested for Linux
Usage
from cpputils import ini_load, default_ca_path, eval_type
ini_load(files={"s3_configs": ["examples/config/aws_config",
"examples/config/aws_credentials",
"examples/config/.s3cfg"]},
sections=["default", "qa"],
keys={"signurl_use_https": ["signurl_use_https"],
"aws_access_key_id": ["access_key"],
"aws_secret_access_key": ["secret_key"],
"endpoint_url": ["endpoint-url", "host_base"],
"region_name": ["bucket_location", "region", "aws_default_region"],
"service_name": ["service_name"],
"verify": ["ca_certs", "aws_ca_bundle", "ca_bundle"],},
defaults={
"region_name": "us-east-1",
"signurl_use_https": True,
"verify": default_ca_path(),
"service_name": "s3",
})
Installation
pip install cpputils
Development
Prerequisites
- A compiler with C++17 support
- Pip 10+ or CMake >= 3.4 (or 3.8+ on Windows, which was the first version to support VS 2015)
- Ninja or Pip 3.8+
Installation
Just clone this repository and pip install. Note the --recursive option which is
needed for the pybind11 submodule:
git clone --recursive https://gitlab.blubblub.tech/sgeist/cpputils.git
pip install .
Publish
twine upload -r pypi $(ls dist/cpputils-1.0.0-*.whl) --verbose
Metadata
Release files for cpputils 1.4.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cpputils-1.4.2.tar.gz | 437.6 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cpputils-1.4.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.10 | CPython 3.10 | Linux glibc 2.17+ x86-64 | Details |
| cpputils-1.4.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.9 | CPython 3.9 | Linux glibc 2.17+ x86-64 | Details |
| cpputils-1.4.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.8 | CPython 3.8 | Linux glibc 2.17+ x86-64 | Details |
Total release size: 1.0 MB
Release files / cpputils-1.4.2.tar.gz
| Download URL | cpputils-1.4.2.tar.gz |
|---|---|
| Size | 437.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
62fc844c67bfeae06e15d135e25c808f1bdb4fbeb9597d1887f9c7a7f293cbc8
|
|
BLAKE2b-256 checksum How to use checksums |
cba48c80a744de7f459a13364793d531727cf33ede6eef54699e7857f4572fdc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Release files / cpputils-1.4.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | cpputils-1.4.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 202.8 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
ec447d1b7b5d23f3fb62a0a28b1732b22262b5a88c1389390c620528f3c65924
|
|
BLAKE2b-256 checksum How to use checksums |
50fafd5b865cabc070dc473fa9dc7367ae7b834449111accd814183c007546fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Release files / cpputils-1.4.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | cpputils-1.4.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 202.8 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
9f874e8e101adcc1b5b498a08cbf39845b8a2ceb2b6e3005c4bdd7a4b0cc0ff3
|
|
BLAKE2b-256 checksum How to use checksums |
07a852caf26fefd33954c6410efb2303e57fa010a138ecc79f4672ab78a77f5e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Release files / cpputils-1.4.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | cpputils-1.4.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 202.6 kB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
f54732893d6181d665c649e1b03fca027524be3bb89a1de785a5ddc46de9cd86
|
|
BLAKE2b-256 checksum How to use checksums |
ab5b57333afb1c7ef2fdf35f537d36836b23c2e27865ec6f5bcf306dcd350e0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|