Skip to content

Python implementation of an old PHP fuel tracking project.

License

Notifications You must be signed in to change notification settings

bbrowning918/pyfuel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyFuel

Python rewrite of my fuel tracker from PHP. Largely just an excuse to play with Django.

Dependencies

Backend

backend/requirements.txt is a pip freeze of the full environment. It contains some helper scripts for AWS ElasticBeanstalk hosting.

Frontend

Again, the above are the main pieces and the full compliment is in frontend/package.json. Managed using Create React App.

Environment Variables

The backend/pyfuel/.env.example file outlines the environment variables that are required by the backend, most are security related in Django.

The frontend/.env.example file outlines the environment variables for the front end.

Database

MySQL was used for legacy reasons. Using any supported Django backend on a fresh instance should not pose any issues.

There were problems with some functions only properly supporting positional arguments on PostgreSQL which led to some limitations/early frustrations.

Overview

Dashboard

Served by the frontend providing a basic reporting overview of fuel and vehicle data.

Browsable API Documentation

Served by the backend it outlines all routes and endpoints available in addition to the API itself.

Authentication & Permissions

Anonymouse requests are restricted to only safe methods (GET, HEAD, OPTIONS). All methods are available to authenticated requests.

To authenticate, include your token in the HTTP Authorization header, prefixed by the string literal "Token". The browsable API includes a log in option for accessing html forms of the protected methods.

Example header:

Authorization: Token meowmeowmeow123

About

Python implementation of an old PHP fuel tracking project.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published