Skip to main content

bluemax

bluemax is a python rpc server using websockets.

The concept is that you can write python functions and expose them in the __all__ property of the module.

The complexity comes when you want to do more than this. And that is what I am working on. The most important pattern to me is being able to insert, update and delete in the database and be able to broadcast the changes to all users after the actor gets their response. I call it broadcast_on_success.

    actor   crud    broadcast
      |       |         |
      |------>|         |
      |       |         |
      |<------|         |
      |       |-------->|
      |       |         |
      |<------|---------|
      |       |         |

The errors from crud are local to the actor. The actor will receive identity on success and then like every other user hear about crud via broadcast.

Using annotations allows clients to infer function. See the sample.add function.

For deployment of multiple servers see:

http://www.tornadoweb.org/en/stable/guide/running.html#running-behind-a-load-balancer

To use:

pip install bluemax

To install:

python3.7 -m venv venv
. venv/bin/activate
pip install -e git+https://bitbucket.org/blueshed/bluemax.git#egg=bluemax

To run you can choose either with workers using redis or standalone.

To run standalone:

bluemax run.server -m bluemax.tests.foo

To run with redis:

pip install bluemax[redis]
docker run -p 6379:6379 -d redis:2.8

Then create a conf.yml file containing:

---
procedures: tests.foo
services: tests.foo.services
REDIS_URL: redis://localhost

Then run a worker in one terminal and a server in the another.

bluemax run.worker -c conf.yml

and

bluemax run.services -c conf.yml

and

bluemax run.server -c conf.yml

Now go to http://localhost:8080 and add some numbers.

To build your own project try:

bluemax sidney olive

You can use any name for your module. It will create extension points for logs, settings, urls and a base procedures modules. bluemax will look for your procedures.all in the module you pass in.

Metadata

Release files for bluemax 0.2.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bluemax 0.2.7
File Size Uploaded Provenance Actions
bluemax-0.2.7.tar.gz 33.1 kB Without provenance Details for bluemax-0.2.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bluemax 0.2.7
File Interpreter ABI Platform Actions
bluemax-0.2.7-py3-none-any.whl Python 3 none any Details for bluemax-0.2.7-py3-none-any.whl

Total release size: 84.4 kB

Release files / bluemax-0.2.7.tar.gz

Download URL bluemax-0.2.7.tar.gz
Size 33.1 kB
Tags Source
SHA-256 checksum
How to use checksums
fe2d36ce88d87cf6cc8302bc7ca724e0574f563967d93483f2598e5cec918cd5
BLAKE2b-256 checksum
How to use checksums
6b75b8ce7041f835693ab690cebcfb51f1b8b76c5e032ea15545bdc43d7e7a72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4

Release files / bluemax-0.2.7-py3-none-any.whl

Download URL bluemax-0.2.7-py3-none-any.whl
Size 51.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cdcf17fd1c4bf163476915b15a52ce5de6cce563f83611ffa4a08f0e9e9b30bc
BLAKE2b-256 checksum
How to use checksums
5b6868123a728dfb9164af10f52cea7bd4650c8ab0381b90187dfea7f1cc9ed8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4

Security for bluemax 0.2.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.7 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page