python-vagrant-metadata
python-vagrant-metadata is a library for download vagrant box in vagrant cloud or customs site.
import requests
from vagrant_metadata import fetch, forge_metadata_url
metadata = fetch(forge_metadata_url('ubuntu/trusty64'))
url = metadata.url_for_youngest_version('virtualbox')
response = requests.get(url)
if response.ok:
with open('mybox.box', 'wb') as f:
f.write(response.content)
If you need the checksum of box for specific versions, you can use provider as like
import requests
from vagrant_metadata import fetch, forge_metadata_url
metadata = fetch(forge_metadata_url('ubuntu/trusty64'))
url = metadata.url_for('20190514.0.0','virtualbox')
response = requests.get(url)
if response.ok:
with open('mybox.box', 'wb') as f:
f.write(response.content)
If you need the checksum of box, you can use provider as like
from vagrant_metadata import fetch, forge_metadata_url
metadata = fetch(forge_metadata_url('ubuntu/trusty64'))
provider = metadata.youngest()['virtualbox']
print(provider.url)
print(provider.checksum)
If you need the checksum of box for specific versions, you can use provider as like
from vagrant_metadata import fetch, forge_metadata_url
metadata = fetch(forge_metadata_url('ubuntu/trusty64'))
provider = metadata['20190514.0.0']['virtualbox']
print(provider.url)
print(provider.checksum)
If you want only version with the specific provider, you can filtering as like
from vagrant_metadata import fetch, forge_metadata_url
metadata = fetch(forge_metadata_url('ubuntu/trusty64'))
provider = metadata.keep_only_provider('virtualbox').youngest()['virtualbox']
print(provider.url)
print(provider.checksum)
Build package
python3 setup.py bdist_wheel
python3 -m twine upload --skip-existing --repository testpypi dist/*
python3 -m pip install --index-url https://test.pypi.org/simple/ python-vagrant-metadata
Metadata
Release files for python-vagrant-metadata 0.0.5
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 |
|---|---|---|---|---|
| python-vagrant-metadata-0.0.5.tar.gz | 17.6 kB | Without provenance | Details for python-vagrant-metadata-0.0.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| python_vagrant_metadata-0.0.5-py3-none-any.whl | Python 3 | none | any | Details for python_vagrant_metadata-0.0.5-py3-none-any.whl |
Total release size: 34.9 kB
Release files / python-vagrant-metadata-0.0.5.tar.gz
| Download URL | python-vagrant-metadata-0.0.5.tar.gz |
|---|---|
| Size | 17.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
98c4355ce7f026c5d9ddd9aa58b249b2e83ab41d2d96a85bc7be7314569426b2
|
|
BLAKE2b-256 checksum How to use checksums |
47c923c16e69ea67c5efe423da79deb12b33a115054cf4d372c1e90f4dd59f4c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Release files / python_vagrant_metadata-0.0.5-py3-none-any.whl
| Download URL | python_vagrant_metadata-0.0.5-py3-none-any.whl |
|---|---|
| Size | 17.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
67abf8d5b53a6185c111d3dcaa11e39ced6b3d4e57204821652ce96362e878c9
|
|
BLAKE2b-256 checksum How to use checksums |
c80cf3635d6d2e0a27dfaf787925a36c1911a865f063cf0284caa58cece790fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Security for python-vagrant-metadata 0.0.5
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.