Skip to main content

Serverless cloud functions

Contents

  1. Quick Start
  2. Examples
  3. Features
  4. Community
  5. Licensing

Quick Start

  1. Install via pip:
    pip install sels8s
    
  2. Download rc.sh file from Selectel panel
  3. Set environment variables: -OS_USERNAME - your username in panel -OS_PASSWORD - your password -OS_PROJECT_ID - your project id -OS_PROJECT_DOMAIN_NAME - your project domain name -OS_USER_DOMAIN_NAME - your user domain name
  4. Create your own cloud function:
    import sels8s
    
    serverless = sels8s.Serverless()
    
    # upload file
    module = serverless.upload_module('/home/my_file.py')
    
    # create function
    serverless.create_function('my_function')
    
    # add your code and params
    module_id = module.json()["function_id"]
    
    serverless.edit_function('my_function', function_id=module_id,
                             function_name='name_of_function_in_code',
                             module_name='my_file.py', env_vars={'key':'value'},
                             runtime='python', version='3.7')
    
    # invoke your function
    import time
    ex = True
    while ex:
        try:
            activation = serverless.invoke_function('my_function')
            ex = False
        except Exception:
            time.sleep(10)
    
    # get logs and results
    while ex:
        try:
            logs = serverless.get_activation_logs(activation.json()['activation_id'])
            result = serverless.get_activation_result(activation.json()['activation_id'])
            ex = False
        except Exception:
            time.sleep(10)
    

Examples

You can see examples of using cloud functions here

Features

Cloud functions

Docs

Community

GitHub

For all questions - Our Telegram

Licensing

Serverless is licensed under the Apache 2.0.

Metadata

Release files for sels8s 1.0.7

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

Source distribution (sdist)

Source distribution for sels8s 1.0.7
File Size Uploaded Provenance Actions
sels8s-1.0.7.tar.gz 4.0 kB Without provenance Details for sels8s-1.0.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sels8s 1.0.7
File Interpreter ABI Platform Actions
sels8s-1.0.7-py3-none-any.whl Python 3 none any Details for sels8s-1.0.7-py3-none-any.whl

Total release size: 8.2 kB

Release files / sels8s-1.0.7.tar.gz

Download URL sels8s-1.0.7.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
28adeb3156efbe1a5d181a91db730cee46e471011b4df464b25577e36080ba39
BLAKE2b-256 checksum
How to use checksums
dc65f111a6fa07f6532e85aab54e6551e9f28dba6a1c4d383548d74ec0ee1ccd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

Release files / sels8s-1.0.7-py3-none-any.whl

Download URL sels8s-1.0.7-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
567c8f3e5c9eded0d06b4f341d9274eee76dcbd802465d428ddff7fad255468f
BLAKE2b-256 checksum
How to use checksums
e4f593120c3c8f56adda077d3ccb05e325e6ede9b3a2062dd9d92c549ce6dcb4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

Security for sels8s 1.0.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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