Declarative resources with implicit deployment
This package provide classes that allow to setup external resources (utilities, python packages, executables etc.) that will be deployed as they are used. In most cases data should be on the web and it will be deployed and cached locally on only first usage.
There are several examples in test/ folder and getpack.library module
already defined and useable. But main intention is to provide framework for
declarative setup of any resource and work with it without care of deployment.
from getpack.resource import WebResource
class Example(WebResource):
version = '0.1'
archive_url = 'https://example.com/example-0.1.zip'
then it would be used:
import subprocess
subprocess.call(Example()().path / 'example.exe')
Second round braces required to actually make an effect from resource and first round braces used to initialize resource class, that would produce resource descriptions on the fly like follows:
Example(version='0.2', archive_url='https://Example.com/example-0.2.zip')
You may experiment with following working snippet and try to change PySide2
version:
python -c "import getpack.library;getpack.library.PySide2(version='5.14.1')(); import PySide2.QtWidgets; app=PySide2.QtWidgets.QApplication(); w=PySide2.QtWidgets.QPushButton(PySide2.__version__); w.clicked.connect(w.close); w.show(); app.exec_()"
TODO
- Utilize
requirements.txtto reproduce both development and production environments.
Testings
For linux testing with Docker, run: docker build -t test . && docker run -it --rm test pytest .
Environs
GETPACK_RETRIES- int, number of general retries, used for renaming and removing temporary foldersGETPACK_BACKOFF- float, delay between retiresGETPACK_ROOT- str, default root folder for all resources
Metadata
Release files for getpack 0.5.3
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 |
|---|---|---|---|---|
| getpack-0.5.3.tar.gz | 12.9 kB | Without provenance | Details for getpack-0.5.3.tar.gz |
Release files / getpack-0.5.3.tar.gz
| Download URL | getpack-0.5.3.tar.gz |
|---|---|
| Size | 12.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8f369ba9736ab0fb336beee699f00c4b89c087bdb83dc9aa96d7f3482e41fc13
|
|
BLAKE2b-256 checksum How to use checksums |
feff22bb6a7074b53082f871b924ef0aa5857a2d11d9d2b34f71da9edb734f90
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.13
|
Security for getpack 0.5.3
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.