The library source in this repository can be installed and used as is:
- Clone or download the repository contents
- Instantiate a virtual Python environment if desired.
- In a shell, change to the repository root.
- Install with
pip install -e .
A Python wheel can be created for the current contents of this repository as follows:
- Clone or download the repository contents
- Instantiate a virtual Python environment if desired.
- In a shell, change to the repository root.
- Install the standard build library:
pip install --upgrade build
- Build the distributions(s):
python -m build .
- The dist folder will contain distributable packages in those formats available to your installation.
Whenever the googleapis/cloudevents proto definitions change, the matching Python google-events library can be updated to match, as follows:
- Clone or download the repository contents
- Instantiate a virtual Python environment if desired.
- In a shell, change to the repository root, then the scripts folder:
cd scripts
- Install the required libraries to run the generator script:
pip install -r requirements.txt
- For a test run, run the script, specifying a folder of your choice for the output:
python generate-from-proto.py -o [OUTPUT_DIR]
and examine the contents of [OUTPUT_DIR]. - Update the library by having the generator script replace the repository src folder:
python generate-from-proto.py -o ../src
You can install or distribute the updated library with the previous instructions.