• This repository has been archived on 12/Sep/2022
  • Stars
    star
    3
  • Rank 3,956,559 (Top 79 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created over 4 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

"Serverless" PyPI (Python Package Index) served via AWS Lambda. ๐Ÿšง๐Ÿšง๐Ÿšง

lapypi

"Serverless" PyPI (Python Package Index) served via AWS Lambda.

Installation

$ pip install -r requirements.txt

Usage

  1. Deploy Lambda via Chalice
$ chalice deploy

Creating deployment package.
Creating IAM role: lapypi-dev-api_handler
Creating lambda function: lapypi-dev
Updating rest API
Resources deployed:
  - Lambda ARN: arn:aws:lambda:{REGION}:{ACCOUNT_ID}:function:lapypi-dev
  - Rest API URL: {LAMBDA_API_URL}
  1. Upload package to your S3 bucket. This step will be automated later.
  2. Set your Lambda domain as a main or extra index (in requirements.txt):
--index-url {LAMBDA_API_URL}
// or if you still want to use https://pypi.org/
--extra-index-url {LAMBDA_API_URL}

my-own-package
  1. Download the package
$ pip install -r requirements.txt

Looking in indexes: {LAMBDA_API_URL}
Collecting my-own-package
...
Installing collected packages: my-own-package
Successfully installed my-own-package-1.0.0

Development

$ pip install -r requirements.txt
$ chalice local

Found credentials in shared credentials file: ~/.aws/credentials
Serving on http://127.0.0.1:8000

Features (what already works)

  1. AWS Lambda that (almost fully) complies with PEP 503
  2. S3 as storage allows to install packages via pip

TODO

  1. Handle package uploads
  2. How to cache?
  3. Authentication layer