Git Product home page Git Product logo

price-database's Introduction

price-database

A simple Python library and a CLI for storage of prices

The purpose of this project is to provide a storage and means of accessing a price database. It can be reused among multiple projects.

The goal is very simple: separate a storage of prices of various elements (commodities) from other applications or components.

The Price object has several properties:

  • unique identifier = uniquely identifies each record for ease of accessing
  • namespace = distinguishes the namespace for the symbol. Often the exchange name.
  • symbol = security/commodity symbol that identifies it within the namespace (exchange).
  • date = The date of the price
  • time = The time of the price
  • value = Value in currency
  • currency identifier = identifier for the currency. Can be anything the remote system is using.

With these, it should be possible to store prices for commodities used in GnuCash, GnuCash Portfolio, Asset Allocation and other similar financial packages.

Development

I'm toggling between using PyCharm and Visual Studio Code, with the following libraries:

  • pylint,
  • pytest,
  • rope, for refactoring

Installation

pip install -e .

Then manually copy the data/prices-template.db into data/prices.db.

Running

pricedb

is a command-line interface to all the provided functionality. Using Python, the PriceDbApplication class is the front-end, providing the same functionality through code.

Example:

pricedb import data\AUD_2017-11-11_142445.csv AUD -v DEBUG

Logging

click-log package is used to provide log output. Simply enable by passing

-v LEVEL

to the command line, where LEVEL is one of the logging levels. Use empty -v option for details.

price-database's People

Contributors

mistery avatar

Watchers

James Cloos 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.