Skip to content

AWS Lambda precomiled binaries for lxml 3.6.4 built for python 2.7,python 3.6 and lxml 4.5.2 for python 3.8 runtimes

License

Notifications You must be signed in to change notification settings

rdonato/aws-lambda-lxml

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aws-lambda-lxml

AWS Lambda precomiled binaries for lxml built for python 2.7, python 3.6 and python 3.8 runtimes.

libxml2-dev and libxslt-dev are not needed as they are included by default in the machines that run lambdas.

If you are using latest aws python lambda environment you should copy lxml folder in your root zip file.

Example usage

  1. Put the lxml directory in the root of your lambda package
  2. Import lxml and use as usual
from lxml import etree


def handle(event, context):
    return etree.fromstring(event)

Build it yourself

This repo contains a build.sh script that's intended to be run in an Amazon Linux docker container, and build lxml for py27 and py36 for use in AWS Lambda.

To build the latest lxml (or any other platform-specific compiled libraries like numpy), run the following:

$ docker run -v $(pwd):/outputs -it lambci/lambda:build-python{2.7|3.6} \
      pip install lxml -t /outputs/

Once you run this, you'll have a folder called lxml (you can ignore the other one with the dist-info), which is the one you are going to place in the root of the lambda package as specified in the example

About

AWS Lambda precomiled binaries for lxml 3.6.4 built for python 2.7,python 3.6 and lxml 4.5.2 for python 3.8 runtimes

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 40.4%
  • C 36.5%
  • XSLT 17.3%
  • C++ 3.9%
  • Objective-C 1.9%