Skip to main content

Zurck'z

ZPy Flask MSC, Layer for build microservices


ZPy Flask MSC

Zurck'z Py Flask Micro Services Core

This package contains some helpers features for build python microservices using Flask framework

ZPy use the following packages:

  • pycryptodome
  • Flask
  • marshmallow
  • cx-Oracle

Requirements

  • Python 3.6+
  • Boto 3+
  • Oracle Client

Installation

Use the package manager pip to install py flask micro service core .

pip install boto3
pip install zpy

Features

Contains some helper features with specific integrations.

  • Api
    • Api Builder
    • Response Builder
    • Models
    • Hooks
    • Middlewares
    • Exceptions
    • Repositories
      • Only oracle repository implementation for functions calling.
  • Cloud Implementations
    • AWS Services
      • S3
      • SSM
      • Firehose
      • SQS
  • Custom
    • Plugings
  • Database
    • Only Oracle implementation
      • Functions executor
  • Logger
    • Stream
  • Utils
    • Collections
    • Cipher
    • Functions
    • gzip

Basic Usage

Define restful resource

from zpy.api.resource import ZResource, HTTP_METHODS


class UserResource(ZResource):

    def __init__(self, **kwargs) -> None:
        super().__init__()
        # Receive any dependency by keywords arguments

    def get(self):
        l, i = super().new_operation()
        try:
            return self.success({"user": {"name":"Zurckz"}}, logger=l)
        except Exception as e:
            return self.handle_exceptions(e, l, i)

Setup api

#Define api
@api(base='/v1', config=config)
def create_api():
    #Set all supported resource for this web service.
    return \
    [
        ZResource('/', UserResource)
    ]

Local Dev Deploy

from api import create_api

app = create_api()

# 🚨 Only use it in local tests 💻
if __name__ == "__main__":
    app.run(host="localhost", debug=True)

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Authors

Noé Cruz

Metadata

Release files for zpy-flask-msc 0.0.1

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

Source distribution (sdist)

Source distribution for zpy-flask-msc 0.0.1
File Size Uploaded
zpy-flask-msc-0.0.1.tar.gz 32.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zpy-flask-msc 0.0.1
File Interpreter ABI Platform
zpy_flask_msc-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 77.2 kB

Release files / zpy-flask-msc-0.0.1.tar.gz

Download URL zpy-flask-msc-0.0.1.tar.gz
Size 32.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7f15a64c003a2d5d12f453dde3af9bff3980c4af51cffae41722f903a2df26e8
BLAKE2b-256 checksum
How to use checksums
081d285c00140c028373d52878e752087e1c68e20898fd232fd23aa748368f6a
Upload date
Uploaded using Trusted Publishing?
What is 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.2 CPython/3.8.5

Release files / zpy_flask_msc-0.0.1-py3-none-any.whl

Download URL zpy_flask_msc-0.0.1-py3-none-any.whl
Size 44.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
95ca81295c2e6588bd2c3689e03fb9cab17c43d328c11b18c5bf90cb2fecdc24
BLAKE2b-256 checksum
How to use checksums
f29b7ca77c3d4537752b56bedbc00559713e09ae6c0879e72168b956719342b6
Upload date
Uploaded using Trusted Publishing?
What is 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.2 CPython/3.8.5

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

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