Giter Site home page Giter Site logo

elephant's Introduction

Elephant

Elephant is an S3-backed key-value store with querying powered by Elastic Search. Your data is persisted on S3 as simple JSON documents, but you can instantly query it over HTTP.

Suddenly, your data becomes as durable as S3, as portable as JSON, and as queryable as HTTP. Enjoy!

Usage

>>> requests.post('http://elephant-server/pages/', data={'title': 'Test Page', 'draft': True})
<Response [200]>

>>> requests.get('http://elephant-server/pages/', params={'q': 'draft:True'}).json()
{u'records': [{u'epoch': 1364286524987, u'title': u'Test Post', u'uuid': u'ce251e8a-ab6b-4f7e-bdc4-eecf0e71ac16', 'draft': True}]}

Configuration

Elephant expects the following environment variables to be set:

# AWS Credentials
AWS_ACCESS_KEY_ID = xxxxxx
AWS_SECRET_ACCESS_KEY = xxxxxx

# Elastic Search Server
ELASTICSEARCH_URL = xxxxxx

# Instance Name
CLUSTER_NAME = xxxxxx

# Instance Password
API_KEY = xxxxxx

If you need an Elastic Search to test against, checkout heroku-elasticsearch.

Management

Reseeding ElasticSearch is super simple:

$ python elephant.py purge
Deleting all indexes...

$ python elephant.py seed
Calculating Indexes...
[################################] 378/378
Creating Indexes...
Indexing...
[####                            ] 29/378

Inspiration

Extracted out of the in-progress blackbox project.

elephant's People

Contributors

streeter avatar chuckm avatar gabrielfalcao avatar sigmavirus24 avatar

Watchers

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