kopia lustrzana https://github.com/bugout-dev/moonstream
Version file for client and isort
rodzic
42025382e7
commit
45032157dd
|
@ -0,0 +1,3 @@
|
|||
[settings]
|
||||
profile = black
|
||||
multi_line_output = 3
|
|
@ -0,0 +1,3 @@
|
|||
[settings]
|
||||
profile = black
|
||||
multi_line_output = 3
|
|
@ -1,20 +1,18 @@
|
|||
from dataclasses import dataclass, field
|
||||
import logging
|
||||
import os
|
||||
from dataclasses import dataclass, field
|
||||
from typing import Any, Dict, List, Optional
|
||||
|
||||
import requests
|
||||
|
||||
from .version import MOONSTREAM_CLIENT_VERSION
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
log_level = logging.INFO
|
||||
if os.environ.get("DEBUG", "").lower() in ["true", "1"]:
|
||||
log_level = logging.DEBUG
|
||||
logger.setLevel(log_level)
|
||||
|
||||
|
||||
# Keep this synchronized with the version in setup.py
|
||||
CLIENT_VERSION = "0.0.2"
|
||||
|
||||
ENDPOINT_PING = "/ping"
|
||||
ENDPOINT_VERSION = "/version"
|
||||
ENDPOINT_NOW = "/now"
|
||||
|
@ -100,7 +98,7 @@ class Moonstream:
|
|||
self.timeout = timeout
|
||||
self._session = requests.Session()
|
||||
self._session.headers.update(
|
||||
{"User-Agent": f"Moonstream Python client (version {CLIENT_VERSION})"}
|
||||
{"User-Agent": f"Moonstream Python client (version {MOONSTREAM_CLIENT_VERSION})"}
|
||||
)
|
||||
|
||||
def ping(self) -> Dict[str, Any]:
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
MOONSTREAM_CLIENT_VERSION = "0.0.3"
|
|
@ -1,12 +1,14 @@
|
|||
from setuptools import find_packages, setup
|
||||
|
||||
from moonstream.version import MOONSTREAM_CLIENT_VERSION
|
||||
|
||||
long_description = ""
|
||||
with open("README.md") as ifp:
|
||||
long_description = ifp.read()
|
||||
|
||||
setup(
|
||||
name="moonstream",
|
||||
version="0.0.2",
|
||||
version=MOONSTREAM_CLIENT_VERSION,
|
||||
packages=find_packages(),
|
||||
package_data={"moonstream": ["py.typed"]},
|
||||
install_requires=["requests", "dataclasses; python_version=='3.6'"],
|
||||
|
@ -14,6 +16,7 @@ setup(
|
|||
"dev": [
|
||||
"black",
|
||||
"mypy",
|
||||
"isort",
|
||||
"wheel",
|
||||
"types-requests",
|
||||
"types-dataclasses",
|
||||
|
|
Ładowanie…
Reference in New Issue