An open API service indexing awesome lists of open source software.

https://github.com/kimtore/rsync

File dump service with REST API
https://github.com/kimtore/rsync

Last synced: about 1 month ago
JSON representation

File dump service with REST API

Awesome Lists containing this project

README

        

# rsync file dump service

## Create a file storage endpoint

```
# Either create a directory
mkdir files
# Or, symlink into another directory
ln -s /path/to/storage files
```

## Development environment

Set up a virtualenv and install the dependencies:

```
make virtualenv install
python setup.py develop
```

## Running the development server

You need a `local_settings.py` with local development settings:

```
cp web/local_settings.py.example web/local_settings.py
```

Run database migrations:

```
./manage.py migrate
```

Start the web server:

```
./manage.py runserver
```

The server is now running on http://localhost:8000.

## Deploying

The frontend requires NodeJS >= 7.x in order to build correctly.

Execute `make` in the top-level directory:

```
make
```

## Admin interface

http://localhost:8000/admin/

## Create an API user

To create a user, log in to the admin interface and create a user, or use the shell:

```
./manage.py createsuperuser
```

Your API key can be found at http://localhost:8000/admin/tastypie/apikey/.

## Make an API request

You'll need to create a user and an API key.

Then, you can GET and POST to http://localhost:8000/api/v1/file/?username=foo\&api_key=bar.