Git Product home page Git Product logo

bolero's Introduction

bolero

๐Ÿ’ƒ Construct your personal API

Bolero backs up and cleans personal data, and allows you to expose that data as a personal RESTful API.

Methodology

Consuming APIs to access your personal data is a pain. API wrappers make this work less tedious, but each service still has it's own authentication mechanism and data schema. Bolero abstracts away the API layer of downloading your data. Simply authenticate a Bolero tracker with each of your services, and access your data locally via RESTful API or SQL database.

Bolero aims to provide a platform on which you can build your own quantified self visualizations and data munging experiments. Get fast, reliable, and immediate access to the lifetime all the data you store online.

Installation

Local Installation

  1. Install Postgres and have it running locally.

  2. Clone the bolero repo with:

    git clone https://github.com/bcongdon/bolero
    cd bolero
  3. Install bolero's dependencies using Pipenv

    # Install bolero's pip dependencies
    pipenv install
  4. Run the startup script.

    ./start.py

Heroku Deployment

TODO

Trackers

Trackers live in bolero/trackers/ and provide both models and API scrapers for various services.

Supported Services:

  • Fitbit
  • MyFitnessPal
  • Nokia Health (formerly Withings)
  • Todoist
  • Twitter
  • Wunderlist

bolero's People

Contributors

bcongdon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

c4p-n1ck

bolero's Issues

Further decouple plugins from "core"

Plugins should be more like plugins than internal modules.
It's fine to have a list of modules as strings in a configuration file and import them via __import__.

The idea is to have bolero be a relatively lean framework, and push a lot of the complexity / implementation out to the tracker plugins.

Rework Tracker loading

Per #1, trackers will be objects instead of modules.

Thus, tracker loading will need to be updated from the naive importlib.import_module approach.

It will probably be sufficient to do something like youtube-dl's mass-import, and then selectively authenticate / activate the enabled trackers.

Standardize tracker object / behavior

Trackers should be objects, instead of formless modules. They behave more like objects already, and it's more idiomatic to call duck-typed functions of a subclass to Tracker than to a module.

Trackers should be able to do the following:

  • Authenticate the API client
    • handleAuthentication()
  • Do some type of regular scraping function
    • scrape()
  • Do a complete 'refresh' of their object's database
    • backfill()

Trackers should be distinct from their associated models, and should only have simple CRUD tasks on the actual data.

Clearer permission system

Currently, permissions is handled at the tracker implementation level (check_auth is set as a request preprocessor in Tracker.create_api()).

This should be changed so that tracker permissions can be set at the tracker configuration level (i.e. config.json)

Myfitnesspal Tracker backfill range

MyFitnessPalTracker.backfill should find the user's earliest logged day and start backfilling from there.

This is a bit difficult due to the way that the python module used to connect with MFP is structured.
Right now, we're just naively grabbing the last 1 year of history.

Improve testing

Next big push is to get the actual tests working.
#3 reduced the dependencies between the app and trackers, so it should be possible to unit test the trackers without having to load / startup the app. (If it isn't, then that's something to do too)

Not sure how much testing is necessary for an external api driven project like this, but something better than running the updateall cli command would be good. ๐Ÿ‘

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.