{"id":27119132,"url":"https://github.com/tom-spalding/marian","last_synced_at":"2026-01-30T01:13:10.544Z","repository":{"id":57439642,"uuid":"178739640","full_name":"tom-spalding/marian","owner":"tom-spalding","description":"just a personal project, not ready for consumption","archived":false,"fork":false,"pushed_at":"2020-03-07T23:56:14.000Z","size":161,"stargazers_count":1,"open_issues_count":18,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-03T19:45:10.670Z","etag":null,"topics":["api","api-server","digitalocean","flask","google-sheets","python","robinhood","robinhood-api","stocks"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tom-spalding.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-31T20:38:25.000Z","updated_at":"2023-03-08T03:33:03.000Z","dependencies_parsed_at":"2022-09-26T17:20:35.452Z","dependency_job_id":null,"html_url":"https://github.com/tom-spalding/marian","commit_stats":null,"previous_names":["nebulousdog/marian","tom-spalding/marian"],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tom-spalding%2Fmarian","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tom-spalding%2Fmarian/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tom-spalding%2Fmarian/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tom-spalding%2Fmarian/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tom-spalding","download_url":"https://codeload.github.com/tom-spalding/marian/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247618822,"owners_count":20967858,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","api-server","digitalocean","flask","google-sheets","python","robinhood","robinhood-api","stocks"],"created_at":"2025-04-07T08:29:33.387Z","updated_at":"2026-01-30T01:13:10.517Z","avatar_url":"https://github.com/tom-spalding.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"=========\n👸 Marian\n=========\n\n.. image:: https://travis-ci.com/nebulousdog/marian.svg?branch=master\n   :target: https://travis-ci.com/nebulousdog/marian\n   :alt: travis-link\n.. image:: https://codecov.io/gh/nebulousdog/marian/branch/master/graph/badge.svg\n   :target: https://codecov.io/gh/nebulousdog/marian\n   :alt: codecov-link\n.. image:: https://img.shields.io/pypi/v/marian.svg\n   :target: https://pypi.org/project/marian/\n   :alt: pypi-link\n\nFind documentation at `nebulousdog.github.io/marian`_, and `github.com/nebulousdog/marian \u003chttps://github.com/nebulousdog/marian\u003e`_.\n\n.. _nebulousdog.github.io/marian: https://nebulousdog.github.io/marian\n\n*******\nInstall\n*******\n\nClone\n=====\n\nFor devs this is the easiest.\n\n.. code-block:: bash\n\n  git clone --depth=1 git@github.com:nebulousdog/marian.git\n\nPyPi\n====\n\nMarian is distributed via `PyPi \u003chttps://pypi.org/project/marian/\u003e`_, and can be installed with ``pip install marian``.\n\n***************\nRunning Locally\n***************\n\n.. code-block:: bash\n\n  pip install pipenv\n  pipenv install --dev\n  pipenv run flask run\n\nYou'll now see the dynamically created routes.\n\n.. image:: https://user-images.githubusercontent.com/2218331/60761769-c3fd9500-a004-11e9-9888-a3bbc9e8bb5f.png\n   :alt: dynamically applied fast_arrow methods\n\nThis project is primarily a `Flask \u003chttps://github.com/pallets/flask\u003e`_ app built on top of the `Fast Arrow`_ client. See `About This Project \u003chttps://github.com/nebulousdog/marian#about-this-project\u003e`_ for more on that.\n\n.. _Fast Arrow: https://github.com/westonplatter/fast_arrow/\n\nYou can now visit your locally running app at http://127.0.0.1:5000.\n\n******\nDeploy\n******\n\nsimply run ``pipenv run python deploy``.\n\nif this is your first time running this, you will be prompted for your Digital Ocean API token.\n\n.. code-block:: bash\n\n  \u003e pipenv run python deploy.py\n  Loading .env environment variables…\n  Digital Ocean API token not found, retrieve your token from digitalocean.\n  visit https://cloud.digitalocean.com/account/api/tokens.\n  enter token:\n\nTake note of the line that says ``droplet is now active at \u003cip address\u003e``.\n\n***********\nPost Deploy\n***********\n\nTODO: working on that right now.\n\n**************\nAuthentication\n**************\n\nVia Local Web App\n=================\n\nVisit the ``/login`` (http://localhost:5000/login) page to authenticate with Robinhood. Your client is subject to the same session durations that exist for the normal Robinhood app.\n\nIf you're navigating the app's frontend and you have no authenticated session yet, or need to re-authenticate, you will be automatically redirected to the login page as soon as you try to visit a route that requires authentication.\n\nThere are a few reasons that a frontend interface is provided:\n\n* logging into Robinhood with a username/password allows a new user to immediately test Marian.\n* this is the easiest UI way to create/regenerate auth tokens.\n* all generated routes are supplied on the home page to immediately view what is available. these are clickable, which is nice for a new user.\n* pleasant development environment.\n\nThat said though; **this mode is only available for local development.** My intent is to make things incredibly easy for new users or developers. However, after you're set up, auth tokens are meant to be the primary authentication method in production.\n\nVia API\n=======\n\nSimply append your security token as a query param. For example, ``\u003cmarian path\u003e?\u003cquery params\u003e\u0026token=\u003ctoken\u003e``.\n\nTo generate this token, run the app locally and visit http://localhost:5000/token. Here you can see your existing token, or generate a new one.\n\nAll old tokens will be invalidated after a token is regenerated.\n\n***\nAPI\n***\n\nRoutes\n======\n\nYou can find all supported routes by visiting the base route http://localhost:5000 locally.\n\nFormat\n======\n\nBy default the output format is JSON. To output in a format that is more readily accepted by Google Sheets, you can supply a CSV param. For example, ``\u003cmarian path\u003e?\u003cquery params\u003e\u0026csv``. Notice that the CSV param simply must exist. You may also write ``csv=true`` if you wish, but this is redundant.\n\nWorking with Google Sheets\n==========================\n\nYou'll need two things from the deploy; the secure token generated, and the IP address of the droplet.\n\nYou can now import data into your sheet.\n\nExample formula: ``=IMPORTDATA(\"\u003cdroplet ip\u003e/stock_position/all\u0026token=\u003ctoken\u003e\")``\n\n***\nCLI\n***\n\nA CLI wrapper is provided with some handy functionality. This makes things easy for all, because only devs are going to want to use the Pipenv setup. Devs can also utilize the cli though! See the extended notes at `nebulousdog.github.io/marian`_.\n\nSee the available Marian cli commands with ``marian --help``.\n\n******************\nAbout This Project\n******************\n\nWhen writing Marian, my goal was just to get my `Robinhood \u003chttps://robinhood.com/\u003e`_ data into a `Google Sheet \u003chttps://sheets.google.com\u003e`_. If you've used Google Sheets at all, this is a PITA. Now it isn't.\n\nThere are some additional features that I added for my own learning and convenience that I'm proud to share:\n\n* no plaintext saving of Robinhood usernames and passwords\n* dynamically built routes. anything that `Fast Arrow`_ supports is automatically supported by Marian.\n* deploy scripts\n* API token generation\n* CI and tests\n* secure sessions and authentication\n* frontend interface for developing\n* headless production mode\n* JSON and CSV API formats\n\nUpcoming\n========\n\nThe full list is located at https://github.com/nebulousdog/marian/issues.\n\n*************\nConfiguration\n*************\n\nSince Marian is a Flask app, all Flask documentation applies for custom configuration. See http://flask.pocoo.org/docs/latest.\n\n*****\nTests\n*****\n\n1. ``pipenv run tests``\n\n*******\nLinting\n*******\n\n1. ``pipenv run lints``\n\n*********\nReleasing\n*********\n\n1. ``pipenv run bump_version``\n\n*******\nLicense\n*******\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftom-spalding%2Fmarian","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftom-spalding%2Fmarian","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftom-spalding%2Fmarian/lists"}