Skip to content

Commit

Permalink
make pypi package
Browse files Browse the repository at this point in the history
  • Loading branch information
alm0ra committed Jan 9, 2022
1 parent 113502b commit 14fb6e2
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 6 deletions.
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,21 @@
a library for demo trading | backtest and forward test simulation

## Features

# Requirements

- [x] **Limit/Market orders**: you can place a Limit or Market order in 2 side "long", "Short" .
- [x] **SL/TP set**: you can set stop loss and take profit for your market or limit order .
# Documentations
..
# Getting start

install package using PyPI
```bash
pip install trade-engine
```
### import package
```bash
from trade_engine import TradeEngine
engine = TradeEngine()

```
# Contributing
Contributions are very welcome. There are a number of requirements:
* See Issues tab, and feel free to submit your own issues
Expand Down
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[build-system]
requires = [
"setuptools>=42",
"wheel"
]
build-backend = "setuptools.build_meta"
29 changes: 29 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import setuptools

with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()

setuptools.setup(
name="trade_engine",
version="1.1.4",
author="Ali moradi",
author_email="ali.mrd318@gmail.com",
description="a small package for simulate trading",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/xibalbas/trade-engine",
project_urls={
"Bug Tracker": "https://github.com/xibalbas/trade-engine/issues",
},
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
package_dir={"": "src"},
packages=setuptools.find_packages(where="src"),
install_requires = [
'pandas'
],
python_requires=">=3.7",
)
1 change: 0 additions & 1 deletion src/__init__.py

This file was deleted.

1 change: 1 addition & 0 deletions src/trade_engine/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .trade_engine import TradeEngine
1 change: 1 addition & 0 deletions src/operations.py → src/trade_engine/operations.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
class EngineOperation:

"""Engine Operations
All operations realted to TradeEngine class wrote here
"""
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/engine.py → src/trade_engine/trade_engine.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pandas as pd
from operations import EngineOperation
from .operations import EngineOperation


class TradeEngine:
Expand Down

0 comments on commit 14fb6e2

Please sign in to comment.