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

#main.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 main: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-0.0.1.tar.gz (3.3 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: sls.python-0.0.1.tar.gz
  • Upload date:
  • Size: 3.3 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.0

File hashes

Hashes for sls.python-0.0.1.tar.gz
Algorithm Hash digest
SHA256 c4c39a1a808c3edf3e55289b28bd82ef8f680a707ab6f583ec2eaef7add47f49
MD5 29d72d3ea59820f3addb665cccac994b
BLAKE2b-256 21d4b5a82a81715412a3f92883fe2e35c38bd0555f23a17e24cc0e3c24741863

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