-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from uJhin/1.1.7
Update Version 1.1.7.4
- Loading branch information
Showing
5 changed files
with
93 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,7 @@ | ||
|
||
import logging | ||
from . import pkginfo | ||
|
||
from .utils import Version | ||
|
||
|
||
__all__ = ['client', 'websocket'] | ||
__module_name__ = 'upbit-client' | ||
|
||
__open_api_version__ = '1.1.7' | ||
__version__ = __open_api_version__+'.3' | ||
__released_version__ = Version.get_versions(__module_name__) | ||
__latest_version__ = __released_version__[0] | ||
|
||
|
||
if __latest_version__ != __version__: | ||
logging.basicConfig(format="[%(levelname)s] %(message)s") | ||
logging.warning( | ||
f"{__module_name__} is currently a newer version: " | ||
f"{__latest_version__}\n" | ||
f"Please update to the latest version using the pip command: " | ||
f"`pip install --upgrade {__module_name__}`" | ||
) | ||
__all__ = ['client', 'websocket'] | ||
__name__ = pkginfo.PACKAGE_NAME | ||
__version__ = pkginfo.CURRENT_VERSION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
""" | ||
[Upbit Client] | ||
Please read the official Upbit Client document. | ||
Documents: https://ujhin.github.io/upbit-client-docs/ | ||
- Upbit OPEN API Version: 1.1.7 | ||
- Author: ujhin | ||
- Email: [email protected] | ||
- GitHub: https://github.com/uJhin | ||
- Official OPEN API Documents: https://docs.upbit.com | ||
- Official Support Email: [email protected] | ||
""" | ||
|
||
import logging | ||
import requests | ||
|
||
from distutils.version import LooseVersion | ||
|
||
|
||
def _get_versions(package_name): | ||
url = f"https://pypi.org/pypi/{package_name}/json" | ||
resp = requests.get(url) | ||
data = resp.json() | ||
versions = data["releases"].keys() | ||
return sorted(versions, key=LooseVersion, reverse=True) | ||
|
||
|
||
PACKAGE_NAME = 'upbit-client' | ||
|
||
OPEN_API_VERSION = '1.1.7' | ||
CURRENT_VERSION = OPEN_API_VERSION+'.4' | ||
|
||
RELEASED_VERSION = _get_versions(PACKAGE_NAME) | ||
LATEST_VERSION = RELEASED_VERSION[0] | ||
|
||
|
||
if LATEST_VERSION != CURRENT_VERSION: | ||
logging.basicConfig(format="[%(levelname)s] %(message)s") | ||
logging.warning(f""" | ||
{PACKAGE_NAME} is currently a newer version: {LATEST_VERSION}\n | ||
Please update to the latest version using the pip command: | ||
`pip install --upgrade {PACKAGE_NAME}` | ||
""") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters