Skip to content

Proof of concept double-entry accounting REST API backend.

Notifications You must be signed in to change notification settings

dtatarkin/double_entry

Repository files navigation

double_entry

Overview

Proof of concept double-entry accounting REST API backend.

Requirements

  • Ununtu
  • PostgreSQL

Installation

Install pyenv

https://github.com/pyenv/pyenv#installation

Install Python

Installation of libffi-dev required due bug pyenv/pyenv#1183 (comment)

sudo apt-get install libffi-dev
pyenv install 3.7.1

Install pipenv

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py --user
python3 -m pip install --user pipenv

Clone git repository

git clone https://github.com/dtatarkin/double_entry.git
cd double_entry

Install dependancies

pipenv install

Build docs

sphinx-apidoc --doc-project double_entry --output-dir ./docs/apidoc . ./*/migrations ./manage.py accounts/tests/ postings/tests
sphinx-build  ./docs ./docs/_build

Linting

Config file: ./prospector.yaml

prospector

Configure

Create ./.env see .env.example e.g.

SECRET_KEY=<SECRET_KEY>
POSTGRES_DATABASE=double_entry
POSTGRES_USER=double_entry
POSTGRES_PASSWORD=double_entry
POSTGRES_HOST=127.0.0.1
POSTGRES_PORT=5432

Generate migrations

python manage.py makemigrations

Run tests

pytest

with coverage report:

pytest --cov=.

Initialize Database

python manage.py migrate

Provide initial data

python manage.py loaddata users.json
python manage.py loaddata accounts.json

Run server

python manage.py runserver

Browseble api

Swagger

http://127.0.0.1:8000/swagger/

Drawbacks (TODO)

  • No user authentication yet.
  • No data filtering implemented (e.g. django-filter).
  • No Admin Site
  • Not enough documentation

About

Proof of concept double-entry accounting REST API backend.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages