4 Commits
1.5.0 ... main

Author SHA1 Message Date
Teleport
21ee8e1fa5 add __version__ to setup.py
v1.5.2
2023-07-18 02:27:39 +03:00
Teleport
0eebcca218 fix unreasonable spworlds api DDOS error
v1.5.2
2023-07-18 02:23:11 +03:00
Teleport
352ca0f032 fix broken package
v1.5.1
2023-07-13 16:53:52 +03:00
Teleport
dda2abd661 Fix README.md, change author email 2023-05-09 13:35:07 +03:00
7 changed files with 16 additions and 9 deletions

3
.gitignore vendored
View File

@@ -157,3 +157,6 @@ upload.bat
pypi.md
_build
dotenv.sh
publish.sh

3
MANIFEST.in Normal file
View File

@@ -0,0 +1,3 @@
include LICENSE
include requirements.txt
include README.md

View File

@@ -30,5 +30,5 @@ print(api.check_access('437610383310716930'))
## Links
- [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)

View File

@@ -1,3 +1,3 @@
from .api import *
__version__ = '1.5.0'
__version__ = '1.5.2'

View File

@@ -1,3 +1,4 @@
import json
import platform
from base64 import b64encode
from dataclasses import dataclass
@@ -57,7 +58,10 @@ class SpApi:
except rq.exceptions.ConnectionError as error:
raise err.SpwApiError(error)
if response.headers.get('Content-Type') != 'application/json':
try:
response.json()
except json.JSONDecodeError:
raise err.SpwApiDDOS()
if response.ok or response.status_code in ignore_codes:

View File

@@ -1,3 +0,0 @@
[egg_info]
tag_build =
tag_date = 0

View File

@@ -1,8 +1,6 @@
from os import path
from setuptools import setup
from pyspw import __version__
this_directory = path.abspath(path.dirname(__file__))
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')
exec(sorted([el if el.startswith('__version__') else 'Z' for el in open('./pyspw/__init__.py', 'r').read().split('\n')], reverse=True)[0])
setup(
name='Py-SPW',
version=__version__,
@@ -17,7 +17,7 @@ setup(
url='https://github.com/teleportx/Py-SPW',
license='MIT License',
author='Stepan Khozhempo',
author_email='stepan@khoz.ru',
author_email='stepan@xstl.ru',
description='Python library for spworlds API',
long_description=description_md,
long_description_content_type='text/markdown',