Skip to main content

Serverless for translator for pythonistas

Project description

The Idea of pyverless

when working with ALOT of different microservices and APIs its quite common that we are starting to COPY-PASTE some code from one serverless file to another. creating this pyverless let big organizations to share modules in a way that can be used accross the organizations AS A CODE

Getting Started

install pyverless using the following command

pip install sls.python

than define your serverless file using the following syntax

#sls.py

from pyverless import ServerlessFramework, Provider, Function, FunctionEvent, EventTypes

sls = ServerlessFramework(
    framework_version="2 || 3",
    service="aws-python",
)

Provider(
    sls,
    name="aws",
    runtime="python3.8",
    lambda_hashing_version=20201221
)

Function(
    sls,
    name='hello',
    handler='handler.hello',
)

Than run pyls sls:sls and check the serverless.yml that created. it will create this example serverless.yml file. According to sls fw, package.json is not mendatory so right now pyverless wont maintain a package.json file

Key Features:

  • Modules - A module is a collection of related functionality that can be used in different parts of the application.
  • Parameters - A parameter is a value that can be used to configure any part of the configuration, pyverless support 3 different types of parameters, region, stage and region & stage
  • Type-Hinting - with pyverless you will get an out-of-the-box solution to understand what kind of attributes are supported in serverless in one place.

Usage:

by default the pyls MODULE command will generate a serverless.yml file in the current directory.

running: pyls main:sls && sls print --region us-east-1 --stage dev

for example will generate serverless.yml file and print the serverless output when region is us-east-1 and stage is dev

Contributing:

We love our contributors! Please read our Contributing Document to learn how you can start working on the Framework yourself.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sls.python-1.0.0.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

sls.python-1.0.0-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file sls.python-1.0.0.tar.gz.

File metadata

  • Download URL: sls.python-1.0.0.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for sls.python-1.0.0.tar.gz
Algorithm Hash digest
SHA256 8e6df29e29b2627e595bf37556564c40893014e0980e9b8656f73b3964ab5c29
MD5 e73d3b08f8f1a63cf1b66eb72ea15817
BLAKE2b-256 cc2b008dbfb9b0e68b934b590c521306b465a56c99d4b31d5e239b54d7fbc036

See more details on using hashes here.

File details

Details for the file sls.python-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: sls.python-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 2.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for sls.python-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cdf66f21b69f05e76dbae6ecdce2f7efb877a50df4a96559c76b01462d9b384e
MD5 85090e86e4a1a2b733bca3e446f9c281
BLAKE2b-256 99e2e6bbd7d0cbcbef24e0362cbc2fde2764b518dd53668730d6a5a5e9565a1c

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