mirror of
https://github.com/yawaflua/Py-SPW.git
synced 2025-12-11 15:56:22 +02:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
21ee8e1fa5 | ||
|
|
0eebcca218 | ||
|
|
352ca0f032 | ||
|
|
dda2abd661 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -157,3 +157,6 @@ upload.bat
|
|||||||
pypi.md
|
pypi.md
|
||||||
|
|
||||||
_build
|
_build
|
||||||
|
|
||||||
|
dotenv.sh
|
||||||
|
publish.sh
|
||||||
|
|||||||
3
MANIFEST.in
Normal file
3
MANIFEST.in
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
include LICENSE
|
||||||
|
include requirements.txt
|
||||||
|
include README.md
|
||||||
@@ -30,5 +30,5 @@ print(api.check_access('437610383310716930'))
|
|||||||
|
|
||||||
## Links
|
## Links
|
||||||
- [PyPi](https://pypi.org/project/Py-SPW)
|
- [PyPi](https://pypi.org/project/Py-SPW)
|
||||||
- [Documentation](https://pyspw.xstl.ru/latest)
|
- [Documentation](https://pyspw.xstl.ru/en/latest/)
|
||||||
- [API](https://github.com/sp-worlds/api-docs)
|
- [API](https://github.com/sp-worlds/api-docs)
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
from .api import *
|
from .api import *
|
||||||
|
|
||||||
__version__ = '1.5.0'
|
__version__ = '1.5.2'
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import json
|
||||||
import platform
|
import platform
|
||||||
from base64 import b64encode
|
from base64 import b64encode
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
@@ -57,7 +58,10 @@ class SpApi:
|
|||||||
except rq.exceptions.ConnectionError as error:
|
except rq.exceptions.ConnectionError as error:
|
||||||
raise err.SpwApiError(error)
|
raise err.SpwApiError(error)
|
||||||
|
|
||||||
if response.headers.get('Content-Type') != 'application/json':
|
try:
|
||||||
|
response.json()
|
||||||
|
|
||||||
|
except json.JSONDecodeError:
|
||||||
raise err.SpwApiDDOS()
|
raise err.SpwApiDDOS()
|
||||||
|
|
||||||
if response.ok or response.status_code in ignore_codes:
|
if response.ok or response.status_code in ignore_codes:
|
||||||
|
|||||||
6
setup.py
6
setup.py
@@ -1,8 +1,6 @@
|
|||||||
from os import path
|
from os import path
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
|
||||||
from pyspw import __version__
|
|
||||||
|
|
||||||
this_directory = path.abspath(path.dirname(__file__))
|
this_directory = path.abspath(path.dirname(__file__))
|
||||||
|
|
||||||
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
|
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
|
||||||
@@ -10,6 +8,8 @@ with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
|
|||||||
|
|
||||||
requirements = open('requirements.txt', 'r').read().split('\n')
|
requirements = open('requirements.txt', 'r').read().split('\n')
|
||||||
|
|
||||||
|
exec(sorted([el if el.startswith('__version__') else 'Z' for el in open('./pyspw/__init__.py', 'r').read().split('\n')], reverse=True)[0])
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='Py-SPW',
|
name='Py-SPW',
|
||||||
version=__version__,
|
version=__version__,
|
||||||
@@ -17,7 +17,7 @@ setup(
|
|||||||
url='https://github.com/teleportx/Py-SPW',
|
url='https://github.com/teleportx/Py-SPW',
|
||||||
license='MIT License',
|
license='MIT License',
|
||||||
author='Stepan Khozhempo',
|
author='Stepan Khozhempo',
|
||||||
author_email='stepan@khoz.ru',
|
author_email='stepan@xstl.ru',
|
||||||
description='Python library for spworlds API',
|
description='Python library for spworlds API',
|
||||||
long_description=description_md,
|
long_description=description_md,
|
||||||
long_description_content_type='text/markdown',
|
long_description_content_type='text/markdown',
|
||||||
|
|||||||
Reference in New Issue
Block a user