semvec/pypi-packages huggingface dataset:
flask-api-handler 0.1.6
A small wrapper for flask app to ease the endpoints creation
License: MIT
Keywords: Flask API REST flask-restful

Flask API handler
=================

A small wrapper for a Flask app to simplify endpoints creation

Motivation
----------

At my company, we’ve been using Flask-RESTful for a lot of projects for
the past couple of years, and when we mapped exactly what we need from
it, it was mostly the way it allows the user to add routing.

This small module replace for us this functionality, so I’ve decided to
share it with whoever want to give it a try :wink:

Getting Started
---------------

This wrapper helps divide the Flask App into modules and to use
**Classes** instead of functions for views.

Just run pip install and you are good to go:

.. code:: bash

    $ pip install flask-api-handler

Prerequisites
-------------

The only requirement for this project is Flask.

Usage
-----

.. code:: python

    from flask import Flask
    from flask import jsonify
    from flask_api_handler import ApiHandler

    form example import PaymentHandler

    app = Flask(__name__)

    # Init the api handler 
    api = ApiHandler(app)

    class UserHandler(object):
        def get(self):
            return jsonify({"user": "user object example"})
        def put(self):
            return jsonify({"user": "update user example"})

    # Add the endpoints 
    api.add_handler('/user', UserHandler)
    api.add_handler('/payment', PaymentHandler)

TODO
----

-  [STRIKEOUT:Make pip installable] - DONE
-  Add tests
kolada_scraper 0.0.4
A scraper of statistical data from api.kolada.se/v2 built on top of Statscraper.
License: MIT

This is a scraper for statistical data from http://api.kolada.se/v2/ built on top of the `Statscraper package <https://github.com/jplusplus/statscraper>`.

Install
-------

  pip install -r requirements.txt

Example usage
-------------

.. code:: python

  from kolada import KoladaScraper

  scraper = KoladaScraper()

  dataset = scraper.items["N00002"] # pass a KPI id

  # Query by year
  data = dataset.fetch({
    'period': [2016, 2015],
  })

  # ...or by municipality
  towns = [x.value for x in dataset.dimensions['municipality'].allowed_values]
  data = dataset.fetch({
    'municipality': towns[:5],
  })

  # ... or by both
  data = dataset.fetch({
    'period': [2016, 2015],
    'municipality': towns[:5],
  })

  # And then do something with the results.
  print(data.pandas)

TODO
----

- Add more allowed values
- Implement errors when unallowed values are passed
- Implement regions
- Update `chunkify()` function, to make url building better