Skip to content

Commit

Permalink
0.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-zehentleitner committed Nov 9, 2023
1 parent 6c72819 commit 53ccbd8
Show file tree
Hide file tree
Showing 61 changed files with 2,973 additions and 608 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,5 @@ jobs:
generate_release_notes: true
name: unicorn-fy
prerelease: false
tag_name: 0.12.2
tag_name: 0.13.0
token: ${{ secrets.RELEASE_TOKEN }}
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p

[How to upgrade to the latest version!](https://unicorn-fy.docs.lucit.tech/README.html#installation-and-upgrade)

## 0.12.2.dev (development stage/unreleased/unstable)
## 0.13.0.dev (development stage/unreleased/unstable)

## 0.13.0
### Added
- `debug` parameter to `UnicornFy()`
- Cython and PyPy Wheels support

## 0.12.2
Codebase equal to 0.12.0, testing azure pipe
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ The current dependencies are listed

If you run into errors during the installation take a look [here](https://github.com/LUCIT-Systems-and-Development/unicorn-fy/wiki/Installation).

### A wheel and a source file of the latest release with `pip` from [PyPI](https://pypi.org/project/unicorn-fy)
### A binary, PyPy or source code based wheel of the latest version with `pip` from [PyPI](https://pypi.org/project/unicorn-fy)
`pip install unicorn-fy --upgrade`

### A conda package of the latest release with `conda` from [Anaconda](https://anaconda.org/conda-forge/unicorn-fy) via [CONDA-FORGE](https://conda-forge.org).
Expand All @@ -127,11 +127,11 @@ Run in bash:
`pip install https://github.com/LUCIT-Systems-and-Development/unicorn-fy/archive/$(curl -s https://api.github.com/repos/lucit-systems-and-development/unicorn-fy/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")').tar.gz --upgrade`

#### Windows
Use the below command with the version (such as 0.7.0) you determined [here](https://github.com/LUCIT-Systems-and-Development/unicorn-fy/releases/latest):
Use the below command with the version (such as 0.12.2) you determined [here](https://github.com/LUCIT-Systems-and-Development/unicorn-fy/releases/latest):

`pip install https://github.com/LUCIT-Systems-and-Development/unicorn-fy/archive/0.7.0.tar.gz --upgrade`
`pip install https://github.com/LUCIT-Systems-and-Development/unicorn-fy/archive/0.12.2.tar.gz --upgrade`

### From the latest source (dev-stage) with PIP from [Github](https://github.com/LUCIT-Systems-and-Development/unicorn-fy)
### From the latest source (dev-stage) with PIP from [GitHub](https://github.com/LUCIT-Systems-and-Development/unicorn-fy)
This is not a release version and can not be considered to be stable!

`pip install https://github.com/LUCIT-Systems-and-Development/unicorn-fy/tarball/master --upgrade`
Expand Down
2 changes: 2 additions & 0 deletions dev_get_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
format="{asctime} [{levelname:8}] {process} {thread} {module}: {message}",
style="{")

# To use this library you need a valid UNICORN Binance Suite License:
# https://medium.lucit.tech/-87b0088124a8
binance_websocket_api_manager = BinanceWebSocketApiManager(exchange="binance.com")
stream_id = binance_websocket_api_manager.create_stream(['ticker'], ['btcusdt', 'bnbbtc', 'ethbtc'])
#binance_websocket_api_manager.create_stream(['miniTicker'], ['btcusdt', 'bnbbtc', 'ethbtc'])
Expand Down
14 changes: 9 additions & 5 deletions dev_one_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,22 @@ def print_stream_data_from_stream_buffer(binance_websocket_api_manager):
time.sleep(0.01)


binance_websocket_api_manager = BinanceWebSocketApiManager()
# To use this library you need a valid UNICORN Binance Suite License:
# https://medium.lucit.tech/-87b0088124a8
ubwa = BinanceWebSocketApiManager()

worker_thread = threading.Thread(target=print_stream_data_from_stream_buffer, args=(binance_websocket_api_manager,))
worker_thread = threading.Thread(target=print_stream_data_from_stream_buffer, args=(ubwa,))
worker_thread.start()

#channels = {'aggTrade', 'trade', 'kline_1m', 'kline_5m', 'kline_15m', 'kline_30m', 'kline_1h', 'kline_2h', 'kline_4h',
# 'kline_6h', 'kline_8h', 'kline_12h', 'kline_1d', 'kline_3d', 'kline_1w', 'kline_1M', 'miniTicker',
# 'ticker', 'bookTicker', 'depth5', 'depth10', 'depth20', 'depth', 'depth@100ms'}
#arr_channels = {'!miniTicker', '!ticker', '!bookTicker'}

stream_id = binance_websocket_api_manager.create_stream('ticker', ['btcusdt', 'bnbbtc', 'ethbtc'])
stream_id = ubwa.create_stream('ticker', ['btcusdt', 'bnbbtc', 'ethbtc'])
time.sleep(10)
binance_websocket_api_manager.print_stream_info(stream_id)
binance_websocket_api_manager.get_stream_subscriptions(stream_id)
ubwa.print_stream_info(stream_id)
ubwa.get_stream_subscriptions(stream_id)
time.sleep(10)
ubwa.stop_manager()

30 changes: 14 additions & 16 deletions dev_stream_everything_and_unicorn_fy.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.

from unicorn_binance_rest_api import BinanceRestAPIManager
from unicorn_binance_websocket_api.manager import BinanceWebSocketApiManager
from unicorn_fy.unicorn_fy import UnicornFy
import logging
Expand All @@ -42,11 +43,6 @@
import time
import threading

try:
from binance.client import Client
except ImportError:
print("Please install `python-binance`!")
sys.exit(1)

# https://docs.python.org/3/library/logging.html#logging-levels
logging.getLogger("unicorn_fy")
Expand Down Expand Up @@ -78,29 +74,31 @@ def print_stream_data_from_stream_buffer(binance_websocket_api_manager):
markets = []

try:
binance_rest_client = Client(binance_api_key, binance_api_secret)
binance_websocket_api_manager = BinanceWebSocketApiManager()
# To use this library you need a valid UNICORN Binance Suite License:
# https://medium.lucit.tech/-87b0088124a8
ubra = BinanceRestAPIManager(binance_api_key, binance_api_secret)
ubwa = BinanceWebSocketApiManager()
except requests.exceptions.ConnectionError:
print("No internet connection?")
sys.exit(1)

worker_thread = threading.Thread(target=print_stream_data_from_stream_buffer, args=(binance_websocket_api_manager,))
worker_thread = threading.Thread(target=print_stream_data_from_stream_buffer, args=(ubwa,))
worker_thread.start()

data = binance_rest_client.get_all_tickers()
data = ubra.get_all_tickers()
for item in data:
markets.append(item['symbol'])

binance_websocket_api_manager.set_private_api_config(binance_api_key, binance_api_secret)
userdata_stream_id = binance_websocket_api_manager.create_stream(["!userData"], ["arr"])
arr_stream_id = binance_websocket_api_manager.create_stream(arr_channels, "arr")
ubwa.set_private_api_config(binance_api_key, binance_api_secret)
userdata_stream_id = ubwa.create_stream(["!userData"], ["arr"])
arr_stream_id = ubwa.create_stream(arr_channels, "arr")

for channel in channels:
binance_websocket_api_manager.create_stream(channel, markets, stream_label=channel)
ubwa.create_stream(channel, markets, stream_label=channel)

stream_id_trade = binance_websocket_api_manager.get_stream_id_by_label("trade")
binance_websocket_api_manager.get_stream_subscriptions(stream_id_trade)
stream_id_trade = ubwa.get_stream_id_by_label("trade")
ubwa.get_stream_subscriptions(stream_id_trade)

#while True:
# binance_websocket_api_manager.print_summary()
# ubwa.print_summary()
# time.sleep(1)
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p

[Discussions about unicorn-fy releases!](https://github.com/LUCIT-Systems-and-Development/unicorn-fy/discussions/categories/releases)

## 0.12.2.dev (development stage/unreleased/unstable)
[How to upgrade to the latest version!](https://unicorn-fy.docs.lucit.tech/README.html#installation-and-upgrade)

## 0.13.0.dev (development stage/unreleased/unstable)

## 0.13.0
### Added
- `debug` parameter to `UnicornFy()`
- Cython and PyPy Wheels support

## 0.12.2
Codebase equal to 0.12.0, testing azure pipe
Expand Down
76 changes: 76 additions & 0 deletions docs/_sources/code_of_conduct.md.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at https://www.lucit.tech/contact-unicorn-developers.html.
All complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
16 changes: 16 additions & 0 deletions docs/_sources/contributing.md.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Contributing

When contributing to this repository, please first discuss the change you wish to make via issue
with the owners of this repository before making a change.

Please note we have a
[code of conduct](https://github.com/LUCIT-Systems-and-Development/unicorn-fy/blob/master/CODE_OF_CONDUCT.md),
please follow it in all your interactions with the project.

## Pull Request Process

1. Discuss with owners
2. Fork
3. Contribute
4. Fulfill and confirm requirements of the pull request
5. Trigger the pull request
23 changes: 1 addition & 22 deletions docs/_sources/copyright.rst.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1 @@
MIT License
===========

Copyright (c) 2019-2023 LUCIT Systems and Development (https://www.lucit.tech) and Oliver Zehentleitner (https://about.me/oliver-zehentleitner)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
../../LICENSE
9 changes: 6 additions & 3 deletions docs/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ Welcome to UnicornFy's documentation!
:maxdepth: 2
:caption: Contents:

Readme <README.md>
Readme <readme.md>
Modules <modules.rst>
ChangeLog <CHANGELOG.md>
Copyright <copyright.rst>
ChangeLog <changelog.md>
Code of Conduct <code_of_conduct.md>
Contributing <contributing.md>
License <license.rst>
Security <security.md>


Indices and tables
Expand Down
22 changes: 22 additions & 0 deletions docs/_sources/license.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
MIT License
===========

Copyright (c) 2019-2023 LUCIT Systems and Development (https://www.lucit.tech) and Oliver Zehentleitner (https://about.me/oliver-zehentleitner)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit 53ccbd8

Please sign in to comment.