Skip to main content

Zurck'z

ZPy Cloud Utils, Layer for build microservices


ZPy Flask Core

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:

  • boto3
  • ibm-sdk
  • gcloud

Requirements

  • Python 3.6+

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

Release files for zpy-cloud-utils 1.1.2

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-cloud-utils 1.1.2
File Size Uploaded
zpy-cloud-utils-1.1.2.tar.gz 10.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zpy-cloud-utils 1.1.2
File Interpreter ABI Platform
zpy_cloud_utils-1.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 21.7 kB

Release files / zpy-cloud-utils-1.1.2.tar.gz

Download URL zpy-cloud-utils-1.1.2.tar.gz
Size 10.0 kB
Tags Source
SHA-256 checksum
How to use checksums
94b23ee90de7d12c19ba249f1f967db7d571e9fc13de322ddb137f01b1073c8d
BLAKE2b-256 checksum
How to use checksums
3d24ef3aa5f7ddddb65e6f7fbecb33d8f7bce0ad1968affa971f954a053f4825
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.5

Release files / zpy_cloud_utils-1.1.2-py3-none-any.whl

Download URL zpy_cloud_utils-1.1.2-py3-none-any.whl
Size 11.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ca0a456f606244f7311ffcf32e1fc61467f518337e56e2b3072332957e851515
BLAKE2b-256 checksum
How to use checksums
ada6393edda4d3822ba90b05a459e1587e3dd6bdf3bac926fca3122d1e886faf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.5

Release history Release notifications | RSS feed

This release

1.1.2 This release

2 release files

0.0.2

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