Modify package layout in order to support local module installation

This commit is contained in:
moshferatu 2023-09-15 07:15:09 -07:00
parent 9ddfbb11ae
commit 396ca35021
7 changed files with 16 additions and 4 deletions

1
ibkr/__init__.py Normal file
View File

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

View File

@ -1,10 +1,10 @@
import pandas as pd
from datetime import datetime
from exchange import SMART
from .exchange import SMART
from ib_insync import IB, Index, Option
from ib_insync.util import isNan
from market_data_type import LIVE
from .market_data_type import LIVE
from typing import Callable
class Client:

View File

@ -1,5 +1,5 @@
from client import Client
from datetime import datetime
from ibkr.client import Client
ibkr_client = Client(host = '127.0.0.1', port = 7497)

View File

@ -5,8 +5,8 @@
import datetime
import pandas as pd
from exchange import SMART
from ib_insync import *
from ibkr.exchange import SMART
ib = IB()
ib.connect('127.0.0.1', 7497, clientId=1) # Assuming TWS is running on the current machine.

11
setup.py Normal file
View File

@ -0,0 +1,11 @@
from setuptools import setup, find_packages
setup(
name="ibkr",
version="1.0",
packages=find_packages(),
install_requires=[
'ib_insync',
'pandas'
],
)