CND IO
Python lib to import/export content from/into different type of provider : filesystem, git etc...
Usage
Declare a provider
First you need declare a provider, in this sample only one provider is available : FileSystem
For a more simple use of error message, this lib can use CndPrint
import cndprint
import cnd_io
_print = cndprint.CndPrint(level="Info")
provider = cnd_io.CndProviderLocalfile(print=_print)
Use the provider local file system into cnd_io
import cndprint
import cnd_io
_print = cndprint.CndPrint(level="Info")
provider = cnd_io.CndProviderLocalfile(print=_print)
cnd_io = cnd_io.CndIO(provider, print=_print)
Use the provider gitlab into cnd_io
import cndprint
import cnd_io
_print = cndprint.CndPrint(level="Info")
provider = cnd_io.CndProviderGitlab(creds={'private_token': 'my-private-token', host="https://gitlab.com/api/v4/"}, print=_print)
cnd_io = cnd_io.CndIO(provider, print=_print)
Get Content
with file system provider
cnd_io.pull_file('source_name', 'path/myfile.txt')
with gitlab provider
cnd_io.pull_file('source_name', 'path/myfile.txt', branch="main")
Send on file
cnd_io.push_file('source_name', 'path/myfile.txt', 'content_to_push')
Get YAML Content
cnd_io.pull_yaml_file('source_name', 'path/myfile.txt')
Send one YAML file
cnd_io.push_yaml_file('source_name', 'path/myfile.txt', 'content_to_push')
Send multiple file in the same time (one text file + 1 yaml file)
cnd_io.commit_file('source_name', 'path/myfile1.txt', content_to_push1)
cnd_io.commit_yaml_file('source_name', 'path/myfile2.txt', content_to_push2)
cnd_io.push_files('source_name')
Metadata
Release files for CndIO 2.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| CndIO-2.4.0-py3-none-any.whl | Python 3 | none | any | Details for CndIO-2.4.0-py3-none-any.whl |
Release files / CndIO-2.4.0-py3-none-any.whl
| Download URL | CndIO-2.4.0-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8f4628de16e4405c4aa001a07e339ca4982324c7288d33b955ce0e24b6da9040
|
|
BLAKE2b-256 checksum How to use checksums |
aa4b9b16eb06365c7810f7050d22e7c22addc56faebe738f83455d10f2d028ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Security for CndIO 2.4.0
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.