diff --git a/.github/workflows/Formatter.yml b/.github/workflows/Formatter.yml new file mode 100644 index 0000000..61aefde --- /dev/null +++ b/.github/workflows/Formatter.yml @@ -0,0 +1,34 @@ +name: Format code + +on: push + +jobs: + formatter: + name: formatter + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.11.0] + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + ref: ${{ github.head_ref }} + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + pip install autoflake black isort + - name: autoflake + run: autoflake -r . + - name: black + run: black . + - name: isort + run: isort . + - name: Auto Commit + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: Apply Code Formatter Change \ No newline at end of file diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml new file mode 100644 index 0000000..d26f195 --- /dev/null +++ b/.github/workflows/pytest.yaml @@ -0,0 +1,27 @@ +name: Run pytest on all branches + +on: push + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.9 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pipenv + pip install git+https://github.com/aoki-h-jp/binance-bulk-downloader + pipenv install --dev + + - name: Run pytest + run: | + pipenv run pytest -v -s \ No newline at end of file diff --git a/bybit_bulk_downloader/__init__.py b/bybit_bulk_downloader/__init__.py new file mode 100644 index 0000000..15f5525 --- /dev/null +++ b/bybit_bulk_downloader/__init__.py @@ -0,0 +1,3 @@ +""" +bybit bulk downloader: Python library to efficiently and concurrently download historical data files from Bybit. Supports all asset types (spot, USDT-M, COIN-M, options) and all data frequencies. +""" diff --git a/bybit_bulk_downloader/downloader.py b/bybit_bulk_downloader/downloader.py new file mode 100644 index 0000000..e69de29 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..27d858b --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +requests~=2.28.2 +setuptools~=68.1.2 +rich~=10.16.2 +pytest~=4.6.11 \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..794240b --- /dev/null +++ b/setup.py @@ -0,0 +1,12 @@ +from setuptools import setup + +setup( + name="bybit-bulk-downloader", + version="1.0.0", + description=" Python library to efficiently and concurrently download historical data files from Binance. Supports all asset types (spot, USDT-M, COIN-M, options) and all data frequencies.", + install_requires=["requests", "rich", "pytest"], + author="aoki-h-jp", + author_email="aoki.hirotaka.biz@gmail.com", + license="MIT", + packages=["bybit_bulk_downloader"], +)