Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eder/challenge-webservice
https://github.com/eder/challenge-webservice
Last synced: about 23 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/eder/challenge-webservice
- Owner: eder
- Created: 2014-08-04T05:15:24.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2022-12-26T20:14:49.000Z (almost 2 years ago)
- Last Synced: 2023-03-11T16:07:14.222Z (over 1 year ago)
- Language: Python
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Challenger Webservice
Challenger Webservice is an example Flask application illustrating some of my common practices
## Development Environment
At the bare minimum you'll need the following for your development environment:
1. [Python](http://www.python.org/)
2. [MySQL](http://www.mysql.com/)It is strongly recommended to also install and use the following tools:
1. [virtualenv](https://python-guide.readthedocs.org/en/latest/dev/virtualenvs/#virtualenv)
2. [Vagrant](http://vagrantup.com)### Local Setup
The following assumes you have all of the recommended tools listed above installed.
#### 1. Clone the project:
$ git clone [email protected]:eder/challenge-webservice.git
$ cd challenger-webservice#### 2. Create and initialize virtualenv for the project:
$ sudo pip install virtualenv
$ virtualenv challenge
$ source ./challenge/bin/activate
$ pip install -r requirements.txt#### 3. Edit database connection
config/database.py
$ DATABASE_CONF_URI
$ DATABASE_ENG#### 4. Upgrade the database:
$ cd app/config/
#### 5. Database Migrations
$ python migration.py db init
$ python migration.py db migrate
$ python migration.py db upgrade#### 6. Run the development server:
$ python run.py
#### 7. How to use Webservice
Create user:
$ curl -X POST -F facebookId=30 http://localhost:5000/person/Delete user:
$ curl -X DELETE http://localhost:5000/person/30/List users with limit:
$ curl http://localhost:5000/?limit=xxx
#### TestsTo run the tests use the following command:
$ nosetests