Restructure code for use as a local module

This commit is contained in:
moshferatu 2024-01-29 07:52:38 -08:00
parent 332dad3138
commit 342945e09e
7 changed files with 18 additions and 5 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
.env
*.egg-info/
__pycache__/

View File

@ -1,4 +1,4 @@
from client import TradeStationClient
from tradestation import TradeStationClient
from datetime import datetime
from dotenv import load_dotenv
from os import getenv

12
setup.py Normal file
View File

@ -0,0 +1,12 @@
from setuptools import setup, find_packages
setup(
name="tradestation",
version="1.0",
packages=find_packages(),
install_requires=[
'pandas',
'python-dotenv',
'requests'
],
)

View File

@ -1,6 +1,4 @@
import pandas as pd
from client import TradeStationClient
from tradestation import TradeStationClient
from datetime import datetime
from dotenv import load_dotenv
from os import getenv

1
tradestation/__init__.py Normal file
View File

@ -0,0 +1 @@
from .client import TradeStationClient

View File

@ -5,9 +5,10 @@ import webbrowser
from datetime import datetime
from dotenv import load_dotenv
from option import Option
from os import getenv
from .option import Option
load_dotenv()
# TODO: Add support for paper trading API endpoint.