Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

Close

Eco

virtualenv

Instalação em distribuições baseadas em Debian:

# aptitude install python-virtualenv

Via easy_install:

# easy_install virtualenv 

Ou baixe o tarball/zip em http://www.virtualenv.org/en/latest/, descompacte, entre no diretorio e instale como root:

# python setup.py

Crie seu ambiente virtual (env é o nome do ambiente, execute os comandos como usuário sem privilégios):

$ virtualenv env

Ative seu ambiente virtual Python (usando o shell bash):

source env/bin/activate

ou

. env/bin/activate

Dependências

Com seu ambiente virtual Python ativado, instale as dependencias do arquivo requeriments:

pip install -r requeriments

Aplicação

Executando:

python app.py

Enviar Localização

curl -H 'Content-type: application/json' -X POST http://localhost:5000/localization -d '{"id":1, "latitude":1, "longitude":1}'

Enviar Alerta:

curl -H 'Content-type: application/json' -X POST http://localhost:5000/alert -d '{"id":1, "latitude":1, "longitude":1, "message": "Message 1"}'

Excluir Alerta:

curl -X DELETE  http://localhost:5000/alert/1

Receber Alertas:

GET: curl -i  http://localhost:5000/alert

Recent activity

Nothing to see here, move along.

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.