Giter Site home page Giter Site logo

amappy's Introduction

Amappy

image

image

Documentation Status

Amappy is a tool with the ambition to manage your AMAP, easily.

Features

  • Open source tools
  • REST based api, simple and accessible to anyone (developers and programs)
  • users management (users, distributors, supervisors, ...)

Usage

Prepare your environment:

$ workon amappy
$(amappy) cd amappy
$(amappy) pip install -r requirements/test.txt
$(amappy) python setup.py install

Launch REST API:

$(amappy) python -m amappy
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)

or

$(amappy) python -m amappy --host 0.0.0.0 --port 8000
* Running on http://0.0.0.0:8000/ (Press CTRL+C to quit)

Examples:

  • retrieve users:

    # GET /users:
    
    $ curl -k http://127.0.0.1:5000/users
    []
  • create user:

    # POST /users:
    
    $ curl -k -X POST http://127.0.0.1:8000/users --data "firstname=John&name=Doe&[email protected]"
    {
      "id": 1
    }
  • retrieve user by id "1":

    # GET /users/{id}:
    
    $ curl -k -X GET http://127.0.0.1:8000/users/1
    {
      "creation_date": "Sun, 04 Sep 2016 07:35:34 GMT",
      "firstname": "John",
      "name": "Doe"
      "email": "[email protected]",
      "id": 1,
    }
  • retrieve user by name "Doe":

    # GET /users/{name}:
    
    $ curl -k -X GET http://127.0.0.1:8000/users/Doe
    {
      "creation_date": "Sun, 04 Sep 2016 07:35:34 GMT",
      "firstname": "John",
      "name": "Doe"
      "email": "[email protected]",
      "id": 1,
    }
  • modify user by id "1":

    # PUT /users/{id}:
    
    $ curl -k -X PUT http://127.0.0.1:8000/users/1 -d [email protected] -d firstname=Jane
    {
      "creation_date": "Sun, 04 Sep 2016 07:35:34 GMT",
      "firstname": "John",
      "name": "Doe"
      "email": "[email protected]",
      "id": 1,
    }
  • modify user by name "Doe":

    # PUT /users/{name}:
    
    $ curl -k -X PUT http://127.0.0.1:8000/users/Doe -d [email protected] -d firstname=Jany
    {
      "creation_date": "Sun, 04 Sep 2016 07:35:34 GMT",
      "firstname": "John",
      "name": "Doe"
      "email": "[email protected]",
      "id": 1,
    }
  • delete user by id "1":

    # DELETE /users/{id}:
    
    $ curl -k -X DELETE http://127.0.0.1:8000/users/1
    null
  • delete user by name "Doe":

    # DELETE /users/{name}:
    
    $ curl -k -X DELETE http://127.0.0.1:8000/users/Doe
    null

Note

at the moment, there is no enforcement for the fields.

amappy's People

Contributors

julienvitard avatar

Watchers

James Cloos avatar  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.