<commit_before>========
python-λ
========

.. image:: https://img.shields.io/pypi/v/python-lambda.svg
  :alt: Pypi
  :target: https://pypi.python.org/pypi/python-lambda/

.. image:: https://img.shields.io/pypi/dm/python-lambda.svg
  :alt: Pypi downloads per month
  :target: https://pypi.python.org/pypi/python-lambda/

.. image:: https://img.shields.io/pypi/pyversions/python-lambda.svg
  :alt: Python Versions
  :target: https://pypi.python.org/pypi/python-lambda/

Python-lambda is everything you need to start developing your own microservices
using AWS Lambda.

Description
===========

AWS Lambda is a service that allows you to write Python, Java, or Node.js code that gets executed in response to events like http requests or files uploaded to S3.

Working with Lambda is relatively easy, but the process of bundling and deploying your code is not as simple as it could be.

The *Python-Lambda* library takes away the guest work of developing your Python-Lambda microservices by providing you tools to streamline the annoying parts.

Requirements
============

* Python 2.7 (At the time of writing this, AWS Lambda only supports Python 2.7).
* Pip (~8.1.1)
* Virtualenv (~15.0.0)
* Virtualenvwrapper (~4.7.1)

Installation
============

Create a new folder for your project and create a virtualenv.

.. code:: bash

    $ mkdir my_microservice
    $ mkvirtualenv my_microservice

Next Download using pip via pypi.

.. code:: bash

    (my_microservice) $ pip install python-lambda

Getting Started
===============

The following will walk you through writing your first microservice with *Python-lambda*.

From your `my_microservice` directory, run the following to bootstrap your project.

.. code:: bash

    (my_microservice) $ lambda init

If you look at the directory you will see four files were created: `event.json`, `__init__.py`, `service.py`, and `config.yaml`.

Let's begin by taking a look at `config.yaml` in your favorite text editor. For the purpose of this tutorial, the only thing required to be entered is `aws_access_key_id` and `aws_secret_access_key`. You can find these by logging into the AWS management console.<commit_msg>fixed ticks<commit_after>========
python-λ
========

.. image:: https://img.shields.io/pypi/v/python-lambda.svg
  :alt: Pypi
  :target: https://pypi.python.org/pypi/python-lambda/

.. image:: https://img.shields.io/pypi/dm/python-lambda.svg
  :alt: Pypi downloads per month
  :target: https://pypi.python.org/pypi/python-lambda/

.. image:: https://img.shields.io/pypi/pyversions/python-lambda.svg
  :alt: Python Versions
  :target: https://pypi.python.org/pypi/python-lambda/

Python-lambda is everything you need to start developing your own microservices
using AWS Lambda.

Description
===========

AWS Lambda is a service that allows you to write Python, Java, or Node.js code that gets executed in response to events like http requests or files uploaded to S3.

Working with Lambda is relatively easy, but the process of bundling and deploying your code is not as simple as it could be.

The *Python-Lambda* library takes away the guest work of developing your Python-Lambda microservices by providing you tools to streamline the annoying parts.

Requirements
============

* Python 2.7 (At the time of writing this, AWS Lambda only supports Python 2.7).
* Pip (~8.1.1)
* Virtualenv (~15.0.0)
* Virtualenvwrapper (~4.7.1)

Installation
============

Create a new folder for your project and create a virtualenv.

.. code:: bash

    $ mkdir my_microservice
    $ mkvirtualenv my_microservice

Next Download using pip via pypi.

.. code:: bash

    (my_microservice) $ pip install python-lambda

Getting Started
===============

The following will walk you through writing your first microservice with *Python-lambda*.

From your `my_microservice` directory, run the following to bootstrap your project.

.. code:: bash

    (my_microservice) $ lambda init

If you look at the directory you will see four files were created: ``event.json``, ``__init__.py``, ``service.py``, and ``config.yaml``.

Let's begin by taking a look at ``config.yaml`` in your favorite text editor. For the purpose of this tutorial, the only thing required to be entered is ``aws_access_key_id`` and ``aws_secret_access_key``. You can find these by logging into the AWS management console.
{'fraction_non_alphanumeric': 0.11840888066604996, 'fraction_numerical': 0.006938020351526364, 'mean_word_length': 4.136579572446556, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2513966', 'n_tokens_mistral': 1323, 'n_tokens_neox': 1239, 'n_words': 508}