Skip to main content

The Plugin Oriented Programming System

Project description

Pop is used to express the Plugin Oriented Programming Paradigm. The Plugin Oriented Programming Paradigm has been designed to make pluggable software easy to write and easy to extend.

Plugin Oriented Programming presents a new way to scale development teams and deliver complex software. This is done by making the applications entirely out of plugins, and also making the applications themselves natively pluggable with each other.

Using Plugin Oriented Programming it then becomes easy to have the best of both worlds, software can be built in small pieces, making development easier to maintain. The small pieces can then be merged and deployed in a single binary, making code deployment easy as well.

All this using Python, one of the world’s most popular and powerful programming languages.

Getting Started

A more complete Getting Started Guide is available inside of the documentation for pop. The best place to start is in the doc’s Getting Started Guide found here:

https://pop.readthedocs.io

First off, install pop from pypi:

pip3 install pop

Now all it takes to create a pluggable application is a few lines of code. This is the root of every pop project. We create a hub, we add dynamic subsystems, and then we call them through the hub’s namespace.

import pop.hub

hub = pop.hub.Hub()
# Dynamic subsystems can now be added to the hub
hub.pop.sub.add(dyne_name="my_dynamic_sub")
# This hub now exists on the namespace and mirrors the file tree of that sub
# the sub "my_dynamic_sub" had a plugin called "init" with a function called "cli" we could do this:
hub.my_dynamic_sub.init.cli()

Writing your first pop application can be very simple, there is a tool called pop-create that automates much of the groundwork needed to get started with an advanced application.

pip3 install pop-create

Now that you have pop-create, use the tool to bootstrap your project! This will make your Python project boiler plate for you!

mkdir poppy
cd poppy
pop-create seed -n poppy

Now you have a setup.py that file will detect changes to you project and “Just Work”. Feel free to open it up and fill in some of the blank places, like author name, description, etc. The pop-create program also made your first directories, your run.py startup script, everything you need to install your project and the pop conf.py file used to load in configuration. Running pop-create also made a few other files, but nothing to worry about now. Look at pop-create’s documentation for more details of what it can do.

Congratulations! You have a pop project! Now you can run the project:

python3 run.py

With a project up and running you can now add more plugins, more code and more plugin subsystems!

What Happened?

Take a look at the poppy/poppy/init.py file, your little run.py script created the hub, loaded your first plugin subsystem, poppy and called the run function therein. This is the starting point for your app.

Next dive into the pop documentation, we will take you through how to think in Plugin Oriented Programming, helping you see a new way to write code that is more flexible and dynamic than anything you have seen before!

Single Binary

In the first few sentences of this document I promised you a single binary! This is easy to do! Just pip install tiamat:

pip3 install tiamat
tiamat --log-level=debug build -n poppy -r requirements/base.txt

This built a single binary of your program! Now you can run it.

./dist/poppy

Documentation

Check out the docs for more information:

https://pop.readthedocs.io

There is a much more in depth tutorial here, followed by documents on how to think in Plugin Oriented Programming. Take your time to read it, it is not long and can change how you look at writing software!

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

pop-20.1.1.tar.gz (35.5 kB view details)

Uploaded Source

Built Distribution

pop-20.1.1-py3-none-any.whl (38.5 kB view details)

Uploaded Python 3

File details

Details for the file pop-20.1.1.tar.gz.

File metadata

  • Download URL: pop-20.1.1.tar.gz
  • Upload date:
  • Size: 35.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.7

File hashes

Hashes for pop-20.1.1.tar.gz
Algorithm Hash digest
SHA256 d6e7ed782a35b439327b7e923067f0735c83822b88e10d017a6c07c132994e6b
MD5 65bbe5ae69b457a193dfff05c466a0c3
BLAKE2b-256 a9569860e4dca353bd1cd27c771d6f600646920f3285b0c0a58ab290aa9b9eea

See more details on using hashes here.

File details

Details for the file pop-20.1.1-py3-none-any.whl.

File metadata

  • Download URL: pop-20.1.1-py3-none-any.whl
  • Upload date:
  • Size: 38.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.7

File hashes

Hashes for pop-20.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b71e3a63c5ab5b46dd3a99e6ebe4c155f0a553ff97657766154fc8b6d68574b6
MD5 124eae72be8ea0cf07a3e09d932da4fb
BLAKE2b-256 136419faeb024110dd8d5cc82abbf8b75ebcec6c15adf9d8ead8d3e56fd5f363

See more details on using hashes here.

Supported by

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