AnyBlok Ecosystem
What we call the Anyblok Ecosystem
is the collection of Python packages that
provide reusable Bloks or pluggable facilities to external Python libraries.
To illustrate this, let's start with our vision about the AnyBlok ecosystem we would like to exist. Then we will cover the currently existing bloks in more depth.
As a quick reminder, don't forget that a reusable Blok is always inside a Python package. A Python package can expose several Bloks. A Blok provides models and behaviours of its own or merely acts as a wrapper for an external library.
Anyblok's goal is to make developing business applications easier. To do that, we think that a development team needs at least three different kinds of packages to play with:
Business bloks: Functional and business oriented bloks Technical bloks: Bloks that add technical features such as e.g., network protocols, data handling, session management... Development tools: Everything that makes development easier, faster and reliable.
For now the easiest way to explore the Anyblok Ecosystem is Anyblok Organization main github page AnyBlokOrg. Please note that all of those repositories are tagged with topics according to the hereby categorization.
One of the main stakes with business applications is their trustworthiness. To achieve that, we believe in those simple rules:
- Use existing robust and mature component is better than reinventing the wheel.
- The value of a reusable business Blok lies with its genericity and ability of being usable for any use case. It's better to have a smaller scope that can be useful for everyone than to address edge cases.
- Separate the business API from user interface is always a good idea because it avoids polluting the business API with assumptions about one given user interface.
- Unit testing, coverage, implementation examples are mandatory for a reusable Blok.
Note: Please, keep in mind that some of those features are forecasts at the time we're writing those lines, while some others are proof of concepts and some are stable to use in production.
Business Bloks
AnyBlok address a blok for postal addresses normalization
AnyBlok WMS Base these are base Bloks to build Warehouse Management and Logistics applications.
AnyBlok Product provide product catalog management bloks.
AnyBlok sale these are bloks used for sale managment.
AnyBlok REA give abstract class that you can apply to your business, REA itself is a collection of business patterns which you can apply to manage stocks, accounts and so on...
We're writing those lines in the early age of the ecosystem, as it grow it will gain more value. We are working in that way adding bloks to manage common use cases. Feel free to contribute, open issues, create pull request, ask new repository through github.
Technical Bloks
AnyBlok Pyramid beaker using the strength of beaker you are able to precisely configure web sessions and cache on top of pyramid.
AnyBlok Pyramid rest api this blok provides facilities for building restful APIs that interact with AnyBlok models through a CRUD like pattern. It is based on Cornice that provides helpers to build & document REST-ish Web Services with Pyramid, with decent default behaviours.
AnyBlok bus lets AnyBlok send/receive messages on a BUS. Based on Pika Anybloks can communicate through the well known AMQP. Also based on marshmallow models are easily serialized/de-serialized.
AnyBlok jsonschema this blok generates JSON Schema Draft v4 formatting from models using marshmallow-jsonschema
AnyBlok Marshmallow adds validator, serializer and deserializer schema using marshmallow
AnyBlok Pyramid allows to easily expose web interfaces with the power of the well known pyramid framework. The main benefit is that it synchronizes the web session with the SQL session so that the developer does not have to worry about commits, rollbacks, manage pool of SQL connections and so on.
AnyBlok attachment jinja allows jinja template in your reports.
AnyBlok attachment the base blok to manage attachement and report systems.
AnyBlok postgres adds special features to AnyBlok that are dedicated and based on PostgreSQL features. Bloks (will) exploit the strengh of:
- JSONB field which adds
Jsonb
column feature to AnyBlok - Materialized view
- ...
AnyBlok io provides bloks related to Input/Output (I/O) used to import / export allowing to initialize data from files using any format (xml, csv, ...).
AnyBlok mixins provides handy mixins to speed up your development, some features are:
- Make a model readonly
- Make a record readonly according to some conditions
- Add common columns (like id / create date / update date)
- Create workflow
- ...
AnyBlok dramatiq: Dramatiq is a distributed task queueing library. This Blok makes it easy to use Dramatiq with AnyBlok and distributes your workloads over multiple servers.
AnyBlok Multi Engines this blok allows to use multi database backends. Assuming you have one master with multiple replicate databases, you can easily send read requests on replicates and write on the master.
Development tools
AnyBlok Scripts for creating or updating database and unit testing.
Cookiecutter project template for bootstraping Anyblok based projects.