Giter Club home page Giter Club logo

simple-object-store-api's Introduction

Simple Object Store HTTP API

An HTTP API to list and download objects from the Simple Object Store because asking for bytes is kinda needy.

Getting Started

pip install -r requirements.txt

# Windows
# Start UI APi
./run-api.bat
# Start S3 API
./run-server.bat

The server listens on port 8000 by default.

Data Model

S3 is used as the guiding principle for the model which extends what is in Redis with:

Accounts

# An Account DisplayName
/accounts/$ACCOUNT_ID/name "Larry Purdesh"

# Accounts have many buckets
/accounts/$ACCOUNT_ID/buckets {Bucket1, Bucket2}

Bucket

# A Set of buckets for an account
/accounts/$ACCOUNT_ID/buckets {Bucket1, Bucket2}

# A CreationDate
/accounts/$ACCOUNT_ID/buckets/$BUCKET/creationDate  "2020-11-20 09:03:20.903719"

# Buckets have many keys
/keys/$ACCOUNT_ID/$BUCKET {Key1, Key2}

Key

# A Set of keys for a bucket
/keys/$ACCOUNT_ID/$BUCKET {Key1, Key2}

# A Set of objects for a key
/keys/$ACCOUNT_ID/$BUCKET/$KEY {ObjectID1, ObjectID2}

# Size of a key
/keys/$ACCOUNT_ID/$BUCKET/$KEY/size 1000

API Documentation

Once the server has been started, docs are available at http://localhost:8000/docs

Usage

With the API up, clients can create object store allocations using

curl -X POST http://$apiUrl -d @somefile
{
    "objectId": "Some Object ID",
}

Testing

The S3 API compliance with some basic AWS CLI operations can be tested with:

powershell -ExecutionPolicy Bypass -File .\tests\aws_cli_functionality.ps1

This prevents execution restrictions on default Windows configurations from blocking the execution of the test script.

simple-object-store-api's People

Contributors

mrmod avatar

Watchers

 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.