Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Graeme22 committed Sep 18, 2024
1 parent df69918 commit 436a4ad
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Upload Python Package

on:
release:
types: [created]

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies and build
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
python setup.py sdist bdist_wheel
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
19 changes: 19 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.PHONY: venv lint test docs

venv:
python -m venv .venv
.venv/bin/pip install -r requirements.txt
.venv/bin/pip install -e .
#.venv/bin/pip install -r docs/requirements.txt

lint:
.venv/bin/isort --check --diff tradestation/ tests/
.venv/bin/flake8 --count --show-source --statistics tradestation/ tests/
.venv/bin/mypy -p tradestation
.venv/bin/mypy -p tests

test:
.venv/bin/pytest --cov=tradestation --cov-report=term-missing tests/ --cov-fail-under=95

docs:
cd docs; make html
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
httpx
24 changes: 24 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
from setuptools import find_packages, setup


f = open('README.md', 'r')
LONG_DESCRIPTION = f.read()
f.close()

setup(
name='tradestation',
version='0.1',
description='An unofficial SDK for Tradestation!',
long_description=LONG_DESCRIPTION,
long_description_content_type='text/markdown',
author='Graeme Holliday',
author_email='[email protected]',
url='https://github.com/tastyware/tradestation',
license='MIT',
install_requires=[
'httpx>=0.27.0',
],
packages=find_packages(exclude=['ez_setup', 'tests*']),
package_data={'tradestation': ['py.typed']},
include_package_data=True
)
16 changes: 16 additions & 0 deletions tradestation/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import logging

API_URL_V3 = 'https://api.tradestation.com/v3'
API_URL_V2 = 'https://api.tradestation.com/v2'
API_URL_SIM = 'https://sim-api.tradestation.com/v3'
VERSION = '0.1'

logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)

# flake8: noqa

from session import Session

__all__ = ['Session']

Empty file added tradestation/py.typed
Empty file.
3 changes: 3 additions & 0 deletions tradestation/session.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class Session:
pass

0 comments on commit 436a4ad

Please sign in to comment.