Skip to main content

Envoxy Platform Framework

Project description

Envoxy Platform Framework

The Envoxy is a different kind of API REST framework and application daemon, we are trying to use all the best tools and technics together getting all their power and performance to be able to have all the platform running in one unique framework allowing communications and task distribution with:

  • Zapata using (ZeroMQ / UPnP);
  • RabbitMQ using (MQTT / AMQP);
  • Celery;
  • CouchDB;
  • PostgreSQL;

Build envoxyd (Envoxy Daemon) and envoxy python package:

What is envoxyd? It is the process daemon using embeded uWSGI customized to be able to boot our modules using the envoxy structure and API's.

$ make install

or using docker

$ docker build -t envoxy .

Steps during the build processs

  • Install dependencies
  • Delete previous virtualenv dir if exists (/opt/envoxy)
  • Create clean virtualenv (/opt/envoxy) with python3.6 version and activate
  • Give current user permissions to virtualenv dir
  • Install envoxy: python setup install
  • Prepare envoxyd files:
    • Delete src dir (vendors/src)
    • Create envoxyd src dir and make a clean copy o uWSGI
    • Copy envoxyd files to customize uWSGI
  • Install envoxyd: python setup install

Prepare packages to pypi repository

$ make packages

Steps during the packaging processs

  • Install Process
  • Create a Source distribution for both packages: python3 setup.py sdist bdist_wheel

Publish to pypi repository

On project root for envoxy and ./vendors dir for envoxyd

  • Make sure build dir was created
  • build dir must contain a .whl and .tar.gz of the current version
envoxy-0.0.2-py3-none-any.whl
envoxy-0.0.2.tar.gz
  • Upload current package using twine command and enter your credentials for the account you registered on the real PyPI.
$ twine upload dist/*

Run envoxyd

$ envoxyd --http :8080 --set conf=/path/to/confs/envoxy.json

How to use envoxy

Create a new project

$ envoxy-cli --create-project --name my-container

How to build envoxy with Docker

$ docker build --no-cache -t envoxy-ubuntu:18.04 -f envoxy-ubuntu.Dockerfile .
$ docker build -t envoxy .

Use an existent project path as volume

$ docker run -it -d -p 8080:8080 -v /path/to/project:/home/envoxy -v /path/to/plugins:/usr/envoxy/plugins envoxy

PostgreSQL connector samples

Select Query

from envoxy import pgsqlc

result = pgsqlc.query(
    "db_name",
    "select * from sample_table where id = 1;"
)

Insert statement and Transaction block

from envoxy import pgsqlc

with pgsqlc.transaction('db_name') as db_conn:

    r = db_conn.query(
        sql="select * from sample_table limit 2"
    )

    db_conn.insert('sample_table2', {
        "field1": "test",
        "field2": "test",
        "id": 1
    })

all inserts statements must be placed inside a transaction block

CouchDB connector samples

Find

valid selectors: eq, gt, gte, lt, lte fields: if defined will only return this fields, otherwise will return all fields

from envoxy import couchdbc

perms = couchdbc.find(
    db="server_key.db_name",
    fields=["id", "field2"]
    params={
        "id": "1234"
        "field1__gt": "2345"
    }
)

Get

Get the document by id

from envoxy import couchdbc

perms = couchdbc.get(
    "005r9odyj91dw0y1ho32lvzh5r2avzngvrouyj",
    db="server_key.db_name",
)

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

envoxy-0.0.21.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

envoxy-0.0.21-py3-none-any.whl (26.7 kB view details)

Uploaded Python 3

File details

Details for the file envoxy-0.0.21.tar.gz.

File metadata

  • Download URL: envoxy-0.0.21.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8

File hashes

Hashes for envoxy-0.0.21.tar.gz
Algorithm Hash digest
SHA256 8b8ded35d13b3fa8039994692700b23d52ed0a8b720221b4a21f1266f0d1345b
MD5 4707a5784f87718074d6e9742bc053a6
BLAKE2b-256 238bfd7c60f5d29b6e85ae8a5783bec128c6db4e9ddac84435871abbbe16b589

See more details on using hashes here.

File details

Details for the file envoxy-0.0.21-py3-none-any.whl.

File metadata

  • Download URL: envoxy-0.0.21-py3-none-any.whl
  • Upload date:
  • Size: 26.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.8

File hashes

Hashes for envoxy-0.0.21-py3-none-any.whl
Algorithm Hash digest
SHA256 39ca3183b89e1df121fc9aeb2c284d19a4391b014cad05d9e68fa3e66054a811
MD5 86438fc01814e495ec9655dbfa97763e
BLAKE2b-256 4f434d80e353eb5644f40067e07edc0aad25a271ade1b721a860de2b7d9e6a58

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