GithubHelp home page GithubHelp logo

contracts-api's Introduction

Build Status

Contracts API

What is it?

The contracts API is a Flask app that provides a RESTful API for managing business processes around contracts

What's the status?

The contracts-api is in its very early stages. We are still in the process of figuring out both the structure of the API (what should the endpoints be? How should the underlying data structures fit together?), and the data model (what are the core components of a contract?).

Who made it?

The contract api is a project of the 2015 Pittsburgh Code for America fellowship team

How

Core Dependencies

The contracts API is a Flask app. It uses Postgres for a database, and the "Kindergarten stack" of peewee and marshmallow for ORM and serialization.

It is highly recommended that you use use virtualenv (and virtualenvwrapper for convenience). For a how-to on getting set up, please consult this howto. It is recommended that you use postgres.app to handle your Postgres (assuming you are developing on OSX).

Install

Use the following commands to bootstrap your environment:

# clone the repo
git clone https://github.com/codeforamerica/contracts-api
# change into the repo directory
cd contracts-api
# install python dependencies
pip install -r requirements/dev.txt
# bring the database up to speed
python manage.py migrate_up
# run the server
python manage.py server

As the app expands in functionality, this section will be updated.

Testing

In order to run the tests, you will need to create a test database. You can follow the same procedures outlined in the install section. By default, the database should be named contracts_api_test:

psql
create database test_contracts_api;

Tests are located in the contracts_api_test directory. To run the tests, run

PYTHONPATH=. nosetests contracts_api_test/

from inside the root directory. For more coverage information, run

PYTHONPATH=. nosetests contracts_api_test/ -v --with-coverage --cover-package=contracts_api --cover-erase

License

See LICENCE.md.

contracts-api's People

Contributors

bsmithgall avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.