Coder Social home page Coder Social logo

lipaul / cassandrarestfulapi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rohitsakala/cassandrarestfulapi

0.0 1.0 0.0 385 KB

CassandraRestfulAPI project exposes the cassandra data tables with the help of Restful API's. The project follows the standard Restful API rules. This project is developed as Major project of the Cloud Computing course by Team 15. The project is developed using Python Driver provided by Datastax using Flask framework. #IIITHyderabad #CloudComputing #CSE565 #Monsoon16 #SIEL #Cassandra #Flask #RestAPI

Home Page: https://github.com/rohitsakala/CassandraRestfulAPI

Python 26.62% Shell 1.52% HTML 71.86%

cassandrarestfulapi's Introduction

CassandraRestfulAPI

=====================

Description

CassandraRestfulAPI project exposes the cassandra data tables and nodes with the help of Restful API's. The project follows the standard Restful API rules. This project is developed as Major project of the Cloud Computing course by Team 15. The project is developed using Python Driver provided by Datastax using Flask framework.

Installation

Flask

$ sudo pip install Flask

Cassandra

Follow these steps to install Cassandra

Python Cassandra Driver

Follow these steps to install python cassandra driver Python Driver Cassandra

Other Dependencies

sudo pip install flask-mongoengine sudo pip install -U flask_paginate

Run the code

First is to start cassandra. Second is to run flask i.e python main.py. Go to https:127:0.0.1:5000/ and use the following API's.

API's

--- Nodes ---

List all the nodes

[GET] http://127.0.0.1:5000/nodes/

Get info of a node

[GET] http://127.0.0.1:5000/nodes/nodeid

Creates a new node

[POST] http://127.0.0.1:5000/nodes/

Body
* { 'username' : username , 'password' : password, 'ip' : ip }

Delete a node

[DELETE] http://127.0.0.1:5000/nodes/nodeid

Body
* { 'username' : username , 'password' : password }

--- Keyspaces ---

List all the Keyspaces

[GET] http://127.0.0.1:5000/keyspaces/

Get Info about a keyspace

[GET] http://127.0.0.1:5000/keyspaces/keyspaceid

Creates a new keyspace

[POST] http://127.0.0.1:5000/keyspaces/

Body
* { 'name' : name , 'replicationFactor' : number }

Updates the keyspace

[PUT] http://127.0.0.1:5000/keyspaces/keyspaceid

Body
* { 'replicationFactor' : number }

Deletes the keyspace

[DELETE] http://127.0.0.1:5000/keyspaces/keyspaceid

--- Column Family ---

List all the column families of a keyspace

[GET] http://127.0.0.1:5000/keyspace/keyspaceid/columnfamilys/

Get info of a column family

[GET] http://127.0.0.1:5000/keyspace/keyspaceid/columnfamilys/columnfamilyid

Creates a new column family

[POST] http://127.0.0.1:5000/keyspace/keyspaceid/columnfamilys/

Body
* { 'name' : name }

Delete a column family

[DELETE] http://127.0.0.1:5000/keyspace/keyspaceid/columnfamilys/columnfamilyid

--- Row Entries ---

List all the rows

[GET] http://127.0.0.1:5000/keyspace/keyspaceid/columnfamilys/columnfamilyid/entrys/

Get Info about a row

[GET] http://127.0.0.1:5000/keyspace/keyspaceid/columnfamilys/columnfamilyid/entrys/entryname

Creates a new row

[POST] http://127.0.0.1:5000/keyspace/keyspaceid/columnfamilys/columnfamilyid/entrys/

Body
* { 'field1' : field name , 'field1_type' : field data type .... }

Deletes the row

[DELETE] http://127.0.0.1:5000/keyspace/keyspaceid/columnfamilys/columnfamilyid/entrys/entryname

######Note:- 10.1.36.68 is the seed ######Note:- In delete node code, path is the directory where cassandra is installed

##More Info

Mail :- [email protected]

cassandrarestfulapi's People

Contributors

rohitsakala avatar

Watchers

 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.