The base package to extend to create a Piper Blueprint
Project description
Piperblue
The base package to extend to create a Piper Blueprint.
What is a Piper Blueprint
A Piper Blueprint is a tool to speed up the creation of new projects.
Instead of manually create repetitive folder structures, you can use piper blueprint to make them for you.
A Piper Blueprint is a Python package that is used by Piper to create a Pipe (for instance, another Python package) with a well-known structure easily.
There are plenty of public Blueprint to use that should cover most needs.
How to use a Blueprint
Once you have choosen the perfect Blueprint (or you have created one by yourself, as explained below), you are ready to create a blueprint.yml file and then run piper blueprint, which will look for it.
In the blueprint.yml you have to specify the structure of your Pipes. For instance, to create a project like this:
common/
microservices/
first/
second/
You have to write:
pipes:
common:
blueprint: <chosen blueprint package>==<version>
config:
...
microservices:
pipes:
first:
blueprint: <chosen blueprint package>==<version>
config:
...
second:
blueprint: <chosen blueprint package>==<version>
config:
...
Please refer to the documentation of the specific Blueprint to know how to write the relative section of the blueprint.yml.
Creating a Piper Blueprint
To create a Piper Blueprint, you have to alternatively:
- (Recommended) Use the
piperblueblueBlueprint withpiper blueprint, to start with your Blueprint project - Setup a Python package with a particular structure
An example of a Blueprint can be found here.
(Recommended) Using Piperblueblue
- Follow the Piperblueblue instructions to create the base structure of your Blueprint
- Modify the content of
resources/blueprintfolder- adding/changing the files you want to be present in your generated Pipe
- Modify the
blueprint.pyscript- extending the proper methods of the base class
Manual creation of a Blueprint
- A
blueprint.pyscript- with a single class extending
PiperBlueprint(from piperblue.blueprint import PiperBlueprint) - extending the proper methods of the super class
- with a single class extending
- A
resourcesfolder- with a
blueprintfolder- containing the files you want to be present in your generated pipe
- with a
- Also, remember to explicit the
piperbluerequirement (for instance in apipe.ymlif you are using Piper to develop it)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file piperblue-0.1.0.tar.gz.
File metadata
- Download URL: piperblue-0.1.0.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5fe3119cdc6ee6bfd48e0b361ae93993d268daf85ac814ce9c478e4d56d30b3
|
|
| MD5 |
0a55d5d693cbf596f743327e606e2ff0
|
|
| BLAKE2b-256 |
f7f7e98d7225f16f637f6f2506498ee83a0beb4c3c2a92d705338726441bfad7
|