semvec/pypi-packages huggingface dataset:
openlobby-app 0.1.0
Open Lobby App
License: MIT

# Open Lobby App

Web based application for Open Lobby - register of lobby meetings.

This application comunicates with Open Lobby Server over
[GraphQL API](http://graphql.org). The server is available in repository
[openlobby/openlobby-server](https://github.com/openlobby/openlobby-server).

## Configuration

Configuration is done by environment variables:
 - `DEBUG` - Set to any value to turn on debug mode. Don't use in production!
 - `SECRET_KEY` - long random secret string (required if not in debug mode)
 - `OPENLOBBY_SERVER_DSN` - Open Lobby Server DSN (default: `http://localhost:8010`)
 - `APP_URL` - URL where you run application (default: `http://localhost:8020`)

## Docker

Docker image is at Docker Hub
[openlobby/openlobby-app](https://hub.docker.com/r/openlobby/openlobby-app/).
It exposes web application on port 8020. You should provide it environment
variables for configuration (at least `SECRET_KEY`).

## Demo

Demo of Open Lobby with instructions is in repository
[openlobby/demo](https://github.com/openlobby/demo).

## Local run and development

You need to have Python 3 installed. Clone this repository and run:

1. `make init-env` - prepares Python virtualenv in dir `.env`
2. `source .env/bin/activate` - activates virtualenv
3. `make install` - installs requirements and application in development mode
4. `make run` - runs development server on port `8020`

Now you can use web interface at `http://localhost:8020`

Next time you can just do steps 2 and 4.

Application development server assumes that you have
[openlobby/openlobby-server](https://github.com/openlobby/openlobby-server).
running on `http://localhost:8010`. You can override this address in environment
variable `OPENLOBBY_SERVER_DSN`. E.g.
`OPENLOBBY_SERVER_DSN=http://my-server:8010 make run`

### Testing

Run: `pytest`
aws-lambda-logging 0.1.1
Nanolib to enhance logging in aws lambda
License: MIT

==================
AWS Lambda Logging
==================

.. image:: https://gitlab.com/hadrien/aws_lambda_logging/badges/master/build.svg

.. image:: https://gitlab.com/hadrien/aws_lambda_logging/badges/master/coverage.svg?job=Run%20py.test

Better logging for aws lambda running on python runtime environment with a
highly opinionated JSON formatting to ease parsing on any logging system.

Usage
=====

.. code::

    import aws_lambda_logging


    def handler(event, context):
        aws_lambda_logging.setup(level='DEBUG')
        ...

You can separately set the logging level for Boto (defaults to the same level):

.. code::

    import aws_lambda_logging


    def handler(event, context):
        aws_lambda_logging.setup(level='DEBUG', boto_level='CRITICAL')
        ...



You can add keyword arguments to be logged each time, such as lambda request
id.

.. code::

    import aws_lambda_logging


    def handler(event, context):
        aws_lambda_logging.setup(level='DEBUG',
                                 aws_request_id=context.get('aws_request_id'))
        log.debug('Just a try!')
        ...


It will output JSON formatted message:

.. code::

    {
        "level": "DEBUG",
        "timestamp": "2016-10-03 13:27:57,438",
        "apigw_request_id": "323fee86-896d-11e6-b7fd-2d914ea80962",
        "location": "root.handler:6",
        "message": "Just a try!"
    }

You can input a JSON string:

.. code::

    log.debug('{"Details": [1,2,3]}')


It will output JSON formatted message with the JSON string embedded properly:

.. code::

    {
        "level": "DEBUG",
        "timestamp": "2016-10-03 13:27:57,438",
        "apigw_request_id": "323fee86-896d-11e6-b7fd-2d914ea80962",
        "location": "root.handler:6",
        "message": {
            "Details": [
                1,
                2,
                3
            ]
        }
    }


You can input a dict:

.. code::

    log.debug({"Details": [1,2,3]})


It will output JSON formatted message with the dict values:

.. code::

    {
        "level": "DEBUG",
        "timestamp": "2016-10-03 13:27:57,438",
        "apigw_request_id": "323fee86-896d-11e6-b7fd-2d914ea80962",
        "location": "root.handler:6",
        "message": {
            "Details": [
                1,
                2,
                3
            ]
        }
    }

Any values that can otherwise be serialisabled to JSON are coerced to
strings.  This behaviour can be changed by parsing a formatter
function to the ``json_default`` keyword argument.