diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..849ddff --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +dist/ diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..9a76954 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,30 @@ +[tool.poetry] +name = "tls-client" +version = "0.2.1" +description = "Advanced Python HTTP Client." +authors = ["Florian Zager "] +license = "MIT" +readme = "README.md" +repository = "https://github.com/FlorianREGAZ/Python-Tls-Client" +packages = [{ include = "tls_client" }] +classifiers = [ + "Environment :: Web Environment", + "Intended Audience :: Developers", + "Natural Language :: English", + "Operating System :: Unix", + "Operating System :: MacOS :: MacOS X", + "Operating System :: Microsoft :: Windows", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Topic :: Internet :: WWW/HTTP", + "Topic :: Software Development :: Libraries", +] +include = ["tls_client/dependencies/*"] + +[tool.poetry.dependencies] +python = "^3.11" + + +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" diff --git a/setup.py b/setup.py deleted file mode 100644 index 626b283..0000000 --- a/setup.py +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/env python -from setuptools import setup, find_packages, Extension -from codecs import open -import glob -import os - -data_files = [] -directories = glob.glob('tls_client/dependencies/') -for directory in directories: - files = glob.glob(directory+'*') - data_files.append(('tls_client/dependencies', files)) - -about = {} -here = os.path.abspath(os.path.dirname(__file__)) -with open(os.path.join(here, "tls_client", "__version__.py"), "r", "utf-8") as f: - exec(f.read(), about) - -with open("README.md", "r", "utf-8") as f: - readme = f.read() - -setup( - name=about["__title__"], - version=about["__version__"], - author=about["__author__"], - description=about["__description__"], - license=about["__license__"], - long_description=readme, - long_description_content_type="text/markdown", - packages=find_packages(), - include_package_data=True, - package_data={ - '': ['*'], - }, - classifiers=[ - "Environment :: Web Environment", - "Intended Audience :: Developers", - "Natural Language :: English", - "Operating System :: Unix", - "Operating System :: MacOS :: MacOS X", - "Operating System :: Microsoft :: Windows", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Topic :: Internet :: WWW/HTTP", - "Topic :: Software Development :: Libraries", - ] -) \ No newline at end of file diff --git a/tls_client/__version__.py b/tls_client/__version__.py deleted file mode 100644 index dc78b09..0000000 --- a/tls_client/__version__.py +++ /dev/null @@ -1,11 +0,0 @@ -# _____ __ __ ___ _ _ _ -# /__ \/ / / _\ / __\ (_) ___ _ __ | |_ -# / /\/ / \ \ _____ / / | | |/ _ \ '_ \| __| -# / / / /____\ \_____/ /___| | | __/ | | | |_ -# \/ \____/\__/ \____/|_|_|\___|_| |_|\__| - -__title__ = "tls_client" -__description__ = "Advanced Python HTTP Client." -__version__ = "0.2.1" -__author__ = "Florian Zager" -__license__ = "MIT" \ No newline at end of file diff --git a/tls_client/sessions.py b/tls_client/sessions.py index cb2a769..5bf8622 100644 --- a/tls_client/sessions.py +++ b/tls_client/sessions.py @@ -3,7 +3,6 @@ from .exceptions import TLSClientExeption from .response import build_response from .structures import CaseInsensitiveDict -from .__version__ import __version__ from typing import Any, Optional, Union from json import dumps, loads @@ -43,7 +42,7 @@ def __init__( # Case-insensitive dictionary of headers, send on each request self.headers = CaseInsensitiveDict( { - "User-Agent": f"tls-client/{__version__}", + "User-Agent": f"tls-client", "Accept-Encoding": "gzip, deflate, br", "Accept": "*/*", "Connection": "keep-alive",