semvec/pypi-packages huggingface dataset:
politico-civic-vote 1.0a1.dev6
Manage votes, electoral votes and delegate counts, the POLITICO way.
License: MIT

![POLITICO](https://rawgithub.com/The-Politico/src/master/images/logo/badge.png)

# politico-civic-vote

Votes. votes. votes. We got the votes.

### Quickstart

1. Install the app.

  ```
  $ pip install politico-civic-vote
  ```

2. Add the app to your Django project and configure settings.

  ```python
  INSTALLED_APPS = [
      # ...
      'rest_framework',
      'entity',
      'geography',
      'government',
      'election',
      'vote',
  ]
  ```

### Bootstrapping your database

1. Ensure `PROPUBLICA_CONGRESS_API_KEY` is exported into your environment. If you don't have an API key for the ProPublica Congress API, you can request one [here](https://www.propublica.org/datastore/api/propublica-congress-api).

2. Bootstrap the database.

```
$ python manage.py bootstrap_vote
```

### Developing

##### Running a development server

Move into the example directory, install dependencies and run the development server with pipenv.

  ```
  $ cd example
  $ pipenv install
  $ pipenv run python manage.py runserver
  ```

##### Setting up a PostgreSQL database

1. Run the make command to setup a fresh database.

  ```
  $ make database
  ```

2. Add a connection URL to `example/.env`.

  ```
  DATABASE_URL="postgres://localhost:5432/vote"
  ```

3. Run migrations from the example app.

  ```
  $ cd example
  $ pipenv run python manage.py migrate
  ```
flask-restly 1.1.0
Build a REST API with Flask
License: MIT
Keywords: flask api rest

# Flask-RESTly

[![Build Status](https://travis-ci.org/gorzechowski/flask-restly.svg?branch=master)](https://travis-ci.org/gorzechowski/flask-restly)
[![Latest version](https://img.shields.io/pypi/v/flask-restly.svg)](https://pypi.org/project/flask-restly)
[![Python versions](https://img.shields.io/pypi/pyversions/flask-restly.svg)](https://pypi.org/project/flask-restly)
[![Coverage Status](https://coveralls.io/repos/github/gorzechowski/flask-restly/badge.svg?branch=master)](https://coveralls.io/github/gorzechowski/flask-restly?branch=master)

## Quick start

```
pip install flask-restly
```

By default `flask-restly` uses JSON serializer.

```python
from flask import Flask
from flask_restly import FlaskRestly
from flask_restly.decorator import resource, get, delete


app = Flask(__name__)

rest = FlaskRestly(app)
rest.init_app(app)


@resource(name='employees')
class EmployeesResource:
    @get('/<id>')
    def get_employee(self, id):
        return dict(id=int(id))

    @get('/')
    def get_employees(self):
        return dict(entites=[
            dict(id=1),
            dict(id=2)
        ])

    @delete('/<id>')
    def delete_employee(self, **kwargs):
        return


with app.app_context():
    EmployeesResource()

if __name__ == "__main__":
    app.run(host='127.0.0.1', port=5001, debug=True)
```

```bash
$ python main.py
* Serving Flask app "main" (lazy loading)
* Environment: production
  WARNING: Do not use the development server in a production environment.
  Use a production WSGI server instead.
* Debug mode: on
* Restarting with stat
* Debugger is active!
* Debugger PIN: 210-167-642
* Running on http://127.0.0.1:5001/ (Press CTRL+C to quit)
```

## Features

* Decorators-based routing
* JSON and Protobuf built-in serialization
* Custom serializer support
* Authorization and authentication decorators
* Automatic REST-like response codes
* API versioning
* Rating limits

## Todo

* HATEOAS/HAL

## Usage

Please see [examples](/examples) for more details.

### Settings

| Name                                                          | Default value                |
| -----------------------------------------------------------:  | :--------------------------- |
| RESTLY_SERIALIZER: `<flask_restly.serializer.SerializerBase>` | flask_restly.serializer.json |
| RESTLY_API_PREFIX: `<str>`                                    | /api/rest                    |
| RESTLY_PROTOBUF_MIMETYPE: `<str>`                             | application/x-protobuf       |
| RESTLY_RATE_LIMIT_REQUESTS_AMOUNT: `<int>`                    | 100                          |
| RESTLY_RATE_LIMIT_WINDOW_SECONDS: `<int>`                     | 60                           |

### Docs

* [Authentication](/docs/Authentication.md)
* [Authorization](/docs/Authorization.md)
* [Decorators](/docs/Decorators.md)
* [Exceptions](/docs/Exceptions.md)
* [Protobuf](/docs/Protobuf.md)
* [RateLimits](/docs/RateLimits.md)