Code Monkey home page Code Monkey logo

plambdapi's Introduction

PλPI

⚠️ WARNING
This project has not been maintained in years.
If you need custom Python package index on AWS, the authors recommend using CodeArtifact, which also supports the free tier.

This project has not been maintained in years. If you need custom Python package index on AWS, the authors recommend using CodeArtifact, which also supports the free tier.

PλPI (or PlambdaPI, which is a play on PyPI) is a simple tool to create an AWS-hosted, PEP 503 compliant personal PyPI repository. It's using S3 bucket to host the repository, indexed using a Lambda function via an API Gateway.

Usage

  1. Install Terraform .
  2. Make a ZIP file with the lambda code: $ zip -r lambda.zip lambda.py
  3. Check terraform configuration: $ terraform plan
  4. Execute terraform configuration: $ terraform apply
  5. Upload your Python package file (egg, wheel and/or gzipped source) to the S3 bucket (creating directory if necessary)
  6. Install the package anywhere using pip install --extra-index-url=[api gateway's URL] [package-name]

Upcoming

  • Better documentation
  • Options to set up authorization on the API Gateway
  • Script to automatically build and upload a Python package

plambdapi's People

Contributors

berislavlopac avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

plambdapi's Issues

Binary media types

Hey, thanks for writing this! It came days before we decided to attempt a similar thing and now have a modified version of it up and running.

We deploy directly with CloudFormation rather than Terraform so I don't know if Terraform somehow mitigates the issues I originally had with getting this up and running correctly, but I found that file downloads would only work properly once adding:

application/zip
application/octet-stream
*/*

as "Binary media types" on the API Gateway console page.

I hope this can help anyone else who stumbles across the same issue.
Thanks again!

Improve documentation

The project needs more detailed documentation, with more examples and any edge cases.

Implement hash URL fragment

PEP 503 states:

The URL SHOULD include a hash in the form of an URL fragment with the following syntax: #<hashname>=<hashvalue>, where <hashname> is the lowercase name of the hash function (such as sha256) and <hashvalue> is the hex encoded digest.

Unable to download package

I can see all terraform resources created. Also, deployed API to get url and uploaded .whl packages to S3 bucket. But nothing happens by running below command
pip install --extra-index-url=https://fbesa5m17k.execute-api.us-east-2.amazonaws.com/test/{proxy+} aditi-itsdangerous

It's not downloading the package.

Authorisation

Explore and if possible implement what is needed to be able to require authorization before using the API. Probably requires changing API Gateway configuration.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.