# Cloud Foundry Dropsonde Protocol for Python
Compiled python generated from the Cloud Foundry Dropsonde Protobuf definition files.
The [Dropsonde Protocol](https://github.com/cloudfoundry/dropsonde-protocol) is defined here, and this repo provides “protoc” compiled Python and Python3 modules.
## Example
The Standard protobuf files are referenced as follows.
`python from dropsonde.pb import envelope_pb2 from dropsonde.pb import error_pb2 from dropsonde.pb import http_pb2 from dropsonde.pb import log_pb2 from dropsonde.pb import metric_pb2 from dropsonde.pb import uuid_pb2 `
The UUID protobuf type is rather cryptic, so a utility function is included for parsing the type into a UUID formatted string.
`python >>> from dropsonde.util import get_uuid_string >>> application_guid = { ... 'low': '12413561682238894606', ... 'high': '3611542221973970511' ... } >>> application_guid = get_uuid_string(**application_guid) >>> print(application_guid) 0ef23f83-94d4-45ac-e455-014268ec2103 >>> `
## Development
The Makefile provides all core development tasks.
### Install environment
make install
This will
1. clone the Dropsonde protobuf repo 1. install dependencies for python2 1. install dependencies for python3
### Refactor and compile the protobuf files
make compile
This will
1. create a copy of the protobuf source files 1. refactor the “import” directives in the source files to match the required python package structure 1. run “protoc” on the refactored source files and output the generated Python code into the “dropsonde.pb” python package tree.
### Test
make test
This will
1. run the tests to ensure that imports work 1. ensure that the UUID conversion tool works
### Clean
make clean
This will
1. remove all the refactored protobuf files 1. remove the virtualenv environments for python2 and python3
### Package
make package
This will only package the compiled python files using setup.py
### Build
make build
This will
1. run the “clone” task 1. run the “compile” task 1. run the “test” task 1. run the “package” task
### Deploy
make deploy
This will
1. run the “clean” task 1. run the “clone” task 1. run the “compile” task 1. run the “test” task 1. run the python setup.py sdist upload to deploy to PyPI.
Metadata
Release files for dropsonde 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 | |
|---|---|---|---|---|
| dropsonde-0.0.5.tar.gz | 12.4 kB | Without provenance | Details |
Release files / dropsonde-0.0.5.tar.gz
| Download URL | dropsonde-0.0.5.tar.gz |
|---|---|
| Size | 12.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
829f0f963559eb73dc09a36623a59623adaf7e198d2c468a502c42bc5009192e
|
|
BLAKE2b-256 checksum How to use checksums |
569e3e657c4e640bdf91d44c5d037e05cddff2730f4fd62ac542c9b66fffcca7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for dropsonde 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.