Skip to content

Commit

Permalink
Find name not taken on pypi: pyrh
Browse files Browse the repository at this point in the history
* Update README
* Update example.ipynb
* update pyproject.toml
  * include python2 requirements
* update poetry.lock
* Fix imports
* Remove setup.py
  • Loading branch information
adithyabsk committed Mar 18, 2020
1 parent 5594f34 commit ce28964
Show file tree
Hide file tree
Showing 13 changed files with 38 additions and 143 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![robinhood-logo](./docs/logo-color-transparent.png)](https://github.com/robinhood-unofficial/Robinhood)
------------

# Unofficial Robinhood API
# pyrh - Unofficial Robinhood API


[![Gitter](https://img.shields.io/gitter/room/J-Robinhood/Lobby)](https://gitter.im/J-Robinhood/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Expand Down
2 changes: 1 addition & 1 deletion docs/example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"outputs": [],
"source": [
"from robinhood import Robinhood\n",
"from pyrh import Robinhood\n",
"from pprint import pprint"
]
},
Expand Down
29 changes: 22 additions & 7 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.poetry]
name = "robinhood"
name = "pyrh"
version = "2.0"
description = "Unofficial Robinhood Python API"
authors = [
Expand Down Expand Up @@ -27,6 +27,8 @@ python = "~2.7 || ^3.6"
requests = "^2.23"
six = "^1.14"
python-dateutil = "^2.8"
configparser = { version = "^3.5", python = "~2.7" }
enum = { version = "^0.4.6", python = "~2.7" }

[tool.poetry.dev-dependencies]
flake8 = "3.7.9"
Expand All @@ -51,7 +53,7 @@ exclude = '''

[tool.isort]
known_first_party = 'robinhood'
known_third_party = ["dateutil", "flaky", "helpers", "pytest", "requests", "setuptools", "six"]
known_third_party = ["dateutil", "flaky", "helpers", "pytest", "requests", "six"]
multi_line_output = 3
lines_after_imports = 2
force_grid_wrap = 0
Expand Down
4 changes: 2 additions & 2 deletions robinhood/__init__.py → pyrh/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@


if six.PY3:
from robinhood.robinhood import Robinhood # noqa
from pyrh.robinhood import Robinhood # noqa
else:
from robinhood import Robinhood # noqa
from pyrh import Robinhood # noqa
import exceptions as RH_exception # noqa

# TODO: when python2 is dropped fix the noqas
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion robinhood/robinhood.py → pyrh/robinhood.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from six.moves.urllib.parse import unquote
from six.moves.urllib.request import getproxies

from robinhood import endpoints, exceptions as RH_exception
from pyrh import endpoints, exceptions as RH_exception


class Bounds(Enum):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import csv
import shelve

from robinhood import Robinhood
from pyrh import Robinhood


def get_symbol_from_instrument_url(rb_client, url, db):
Expand Down
122 changes: 0 additions & 122 deletions setup.py

This file was deleted.

2 changes: 1 addition & 1 deletion tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import requests

from robinhood import Robinhood
from pyrh import Robinhood


def get_config(config_filename):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_getdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
import six
from flaky import flaky

from robinhood import Robinhood
from pyrh import Robinhood


if six.PY2:
from robinhood import RH_exception
from pyrh import RH_exception

HERE = path.abspath(path.dirname(__file__))
ROOT = path.dirname(HERE)
Expand Down
6 changes: 3 additions & 3 deletions tests/test_portfolio.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
import six
from flaky import flaky

import robinhood.exceptions as RH_exception
from robinhood import Robinhood
import pyrh.exceptions as RH_exception
from pyrh import Robinhood


if six.PY2:
from robinhood import RH_exception
from pyrh import RH_exception


HERE = path.abspath(path.dirname(__file__))
Expand Down

0 comments on commit ce28964

Please sign in to comment.