semvec/pypi-packages huggingface dataset:
flask2postman 1.4.4
Generate a Postman collection from your Flask application
License: MIT

.. _Postman: https://www.getpostman.com/
.. _Flask: http://flask.pocoo.org/

=============
flask2postman
=============

.. image:: https://img.shields.io/pypi/v/flask2postman.svg
   :target: https://pypi.python.org/pypi/flask2postman
.. image:: https://img.shields.io/github/license/numberly/flask2postman.svg
   :target: https://github.com/numberly/flask2postman/blob/master/LICENSE

|

A tool that creates a Postman_ collection from a Flask_ application.


Install
=======

.. code-block:: sh

    $ pip install flask2postman


Example
=======

Let's say that you have a Flask project called "example" (see
:code:`example.py`), and you want to generate a Postman collection out of it.

You just need to tell :code:`flask2postman` how to import the Flask instance,
and optionally give a name to the Postman collection:

.. code-block:: sh

    $ flask2postman example.app --name "Example Collection" --folders > example.json

If you don't have a global Flask instance but rather use a function to
initialize your application, that works too:

.. code-block:: sh

    $ flask2postman example.create_app --name "Example Collection" --folders > example.json

This will generate the JSON configuration, and write it into the
:code:`example.json` file. You can then import this file into Postman ("Import
Collection" button), and profit:

.. image:: https://raw.githubusercontent.com/1000mercis/flask2postman/42d20fe89d9d1f831bbfbe6275471e624d40c488/img/screenshot.jpg
    :alt: Postman screenshot

On a side note, you can see that endpoint's docstrings are automatically
imported as descriptions.


Usage
=====

.. code-block:: sh

    usage: flask2postman [-h] [-n NAME] [-b BASE_URL] [-a] [-i] [-f]
                         flask_instance

    positional arguments:
      flask_instance

    optional arguments:
      -h, --help            show this help message and exit
      -n NAME, --name NAME  Postman collection name (default: current directory
                            name)
      -b BASE_URL, --base_url BASE_URL
                            the base of every URL (default: {{base_url}})
      -a, --all             also generate OPTIONS/HEAD methods
      -s, --static          also generate /static/{{filename}} (Flask internal)
      -i, --indent          indent the output
      -f, --folders         add Postman folders for blueprints


License
=======

MIT
chronos-api 0.1.0
API for my timesheet
License: MIT
Requires Python: >=3.6,<4.0

=======
chronos
=======


.. image:: https://img.shields.io/pypi/v/chronos.svg
        :target: https://pypi.python.org/pypi/chronos-api

.. image:: https://img.shields.io/travis/jonaylor89/chronos.svg
        :target: https://travis-ci.org/jonaylor89/chronos

.. image:: https://ci.appveyor.com/api/projects/status/jonaylor89/branch/master?svg=true
    :target: https://ci.appveyor.com/project/jonaylor89/chronos/branch/master
    :alt: Build status on Appveyor

.. image:: https://readthedocs.org/projects/chronos/badge/?version=latest
        :target: https://chronos.readthedocs.io/en/latest/?badge=latest
        :alt: Documentation Status


.. image:: https://pyup.io/repos/github/jonaylor89/chronos/shield.svg
     :target: https://pyup.io/repos/github/jonaylor89/chronos/
     :alt: Updates



API for my timesheet


* Free software: MIT license

* Documentation: https://jonaylor89.github.io/chronos


Execution
===========

.. code-block:: console

    $ docker run -e PORT=8000 jonaylor/chronos
djld 1.0.2
Structured data with Django
License: MIT


Djld
====

Structured data with Django


.. image:: https://img.shields.io/pypi/v/djld.svg
   :target: https://pypi.python.org/pypi/djld/
   :alt: Latest Version


.. image:: https://codecov.io/gh/lotrekagency/djld/branch/master/graph/badge.svg
   :target: https://codecov.io/gh/lotrekagency/djld
   :alt: codecov


.. image:: https://travis-ci.org/lotrekagency/djld.svg?branch=master
   :target: https://travis-ci.org/lotrekagency/djld
   :alt: Build Status


.. image:: https://img.shields.io/badge/License-MIT-blue.svg
   :target: https://github.com/lotrekagency/djld/blob/master/LICENSE
   :alt: License: MIT


Installation
------------

.. code-block:: sh

   pip install djld

Configuration
-------------

Add ``djld`` to your INSTALLED_APPS in settings.py, you can specify the folder containing your structured data overriding the ``LD_JSON_PATH`` variable

Usage
-----

To render structured data in your templates you need the ``structured_data`` template tag

.. code-block:: py

   {% load djld %}

   {% structured_data 'mydata.json' %}

You can use Django template sintax in your json files, and pass a context to the template tag

.. code-block:: py

   render(request, 'myapp/index.html', {
       'user_data' : {
           'url' : 'https://lotrek.it',
           'name' : 'Human Before Digital'
       }
   })

.. code-block:: py

   {% load djld %}

   {% structured_data 'mydata.json' user_data %}

You can also render a structured data from a dictionary, without using templates

.. code-block:: py

   render(request, 'myapp/index.html', {
       'user_data' : {
           'url' : 'https://lotrek.it',
           'name' : 'Human Before Digital'
       }
   })

.. code-block:: py

   {% load djld %}

   {% structured_data user_data %}

Run tests
---------

.. code-block:: sh

   $ pip install -r requirements-dev.txt
   $ make test
lbr-context 0.2.1
A context manager for custom resources
License: MIT

# LBR Context Manager

The best tool for AWS lambda-backed custom resources since sliced cheese!

## How is it used

I'm glad you asked!

First `pip install lbr-context`, then in your custom resource handler:

```python
from lbr_context import CfnContext


def handler(event=None, context=None):
    event = event or {}
    request_type = event['RequestType'].upper()
    with CfnContext(event, context) as cfn:
        if 'CREATE' in request_type:
            # handle a create here
            pass
        elif 'UPDATE' in request_type:
            # handle an update here
            pass
        elif 'DELETE' in request_type:
            # handle a delete here
            pass
```

## So what makes this better

One of the big pains experienced when writing custom resources is getting it wrong, because this can cause your resource to be in an `IN_PROGRESS` state for a long time.

This context manager addresses that, and will catch any uncaught exception. When it catches an exception, it sends the `FAILED` request to the `event`'s endpoint, so CloudFormation knows your custom resource failed to create/update/delete.

On top of that, this context manager sets a timer for when the lambda is about to run out of time, so that it will make sure the `FAILED` request is sent, even if your lambda's timeout is improperly configured.