Skip to main content

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 piperblueblue Blueprint with piper 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/blueprint folder
    • adding/changing the files you want to be present in your generated Pipe
  • Modify the blueprint.py script
    • extending the proper methods of the base class

Manual creation of a Blueprint

  • A blueprint.py script
    • with a single class extending PiperBlueprint (from piperblue.blueprint import PiperBlueprint)
    • extending the proper methods of the super class
  • A resources folder
    • with a blueprint folder
      • containing the files you want to be present in your generated pipe
  • Also, remember to explicit the piperblue requirement (for instance in a pipe.yml if you are using Piper to develop it)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

piperblue-0.1.0.tar.gz (3.4 kB view details)

Uploaded Source

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

Hashes for piperblue-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d5fe3119cdc6ee6bfd48e0b361ae93993d268daf85ac814ce9c478e4d56d30b3
MD5 0a55d5d693cbf596f743327e606e2ff0
BLAKE2b-256 f7f7e98d7225f16f637f6f2506498ee83a0beb4c3c2a92d705338726441bfad7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page