-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,2 +1,3 @@ | |||
*.pyc | *.pyc | ||
.DS_Store | .DS_Store | ||
.codeintel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,35 @@ | |||
# Politmus API | |||
#### Prototype Web Service API for Politmus. | |||
|
|||
The prototype API is written in Python and runs on Google App Engine. There is a live version of the code, including documentation, running on [http://politmus-api.appspot.com](http://politmus-api.appspot.com). | |||
|
|||
The prototype does not implement any of the authentication features stated in the documentation. Please do not use this to collect real or potentially sensitive data. | |||
|
|||
#### Local Development | |||
|
|||
To run the prototype API locally follow these steps. | |||
|
|||
* Download the [Google App Engine SDK for Python](https://developers.google.com/appengine/downloads#Google_App_Engine_SDK_for_Python) and ensure you install the command-line tools | |||
|
|||
* Clone the [politmus-api](https://github.com/ahume/politmus-api) Git repository | |||
|
|||
* `>cd politmus-api/` | |||
|
|||
* `> dev_appserver.py --use_sqlite app` | |||
|
|||
This will start the server on [http://localhost:8080](http://localhost:8080). Hit that URL to check it is working - it should redirect you to the documentation pages. | |||
|
|||
#### Importing Data | |||
|
|||
Sample data is included in the `fixtures` directory. You can import this data by requesting the following endpoints. | |||
|
|||
* Import user account data: [http://localhost:8080/import/users](http://localhost:8080/import/users) | |||
* Import questions and MP data: [http://localhost:8080/import/mpvotes](http://localhost:8080/import/mpvotes) (this may take a few minutes to return!). | |||
|
|||
|
|||
#### Run the tests | |||
|
|||
At this point you should be able to run the project's unit tests. | |||
|
|||
* `> python test/test.py` | |||
|