PCAPI is a storage middleware that abstracts access to Cloud Storage providers in addition to its own local storage. Authentication to external providers like e.g. Dropbox is based on oAuth.
PCAPI is compatible with the Fieldtrip-Open framework for building mobile apps.
Installation is based on the official python PIP tool. It is included in most linux distributions and is also readily available on Windows, OS X using the upstream instructions
In short, you can install PCAPI globally, locally or within a virtual environment just like most sane python packages. For example, to quickly download, install and execute PCAPI as a local user with no special permissions type:
pip install --user git+https://github.com/cobweb-eu/pcapi
pcapi
Docker fans can immediately deploy PCAPI by pointing to the Dockerfile:
docker build -t pcapi https://raw.githubusercontent.com/cobweb-eu/pcapi/master/docker/Dockerfile
One can then can create a pcapi instance listening on port 8080 using
docker run -p 8080:8080 -d pcapi
By default pcapi will store its default configuration and data file under $HOME/.pcapi. One can then edit the file pcapi.ini in that directory to adjust existing configuration or to enable advanced functionality like e.g. publishing data to geoserver (W*S), geonetwork (CSW) services.
PCAPI can also run using apache's mod_wsgi by configuring apache to use pcapi/server.py as a wsgi file.
There is minimal support for automating deployment to remote servers using fabric. To use it, look at the existing fabfile.py.
The easiest way to find what is wrong is to do the following:
- Start the application from the command line locally by running
pcapi
. Look for error messages tail -f ~/.pcapi/logs/pcapi.log
(The actual location is specified in the configuration file)- Start issuing REST calls to localhost using a client like curl or wget e.g.
curl http://localhost:8080/auth/providers
under ./docs: All documenation including the current PCAPI REST API specification.
- under
./src/pcapi
:-
server.py
: The main wsgi app. Start reading the source here. -
data
: default configuration file in .ini format. Configuration is copied to ~/.pcapi folder during installation.
-
- under
./src/test
: the test suite. To run it, cd inside that directory and execute:python -munittest local_usecase
All files are under ~/.pcapi/ (unless overriden by +pcapi.ini+):
pcapi.ini
: Default configuration file.data/sessions.db
: Spatialite3 file contained sessions and geo data.data/<userid>
: Directory containing chroot of user .logs/pcapi.log
: All log outputs as configured in +pcapi.ini+.
Free Software, Hell Yeah!