-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
68 additions
and
4 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,3 +1,2 @@ | ||
# Richka | ||
# Richka - Python Async Download Engine | ||
|
||
Python Async Download Engine |
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 @@ | ||
from .config import * |
Empty file.
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,8 @@ | ||
__title__ = "richka" | ||
__description__ = "Python Async Download Engine." | ||
__url__ = "https://github.com/ghinknet/richka" | ||
__version__ = '0.0.1' | ||
__author__ = "Ian Xia" | ||
__author_email__ = "xia@ghink.net" | ||
__license__ = "MIT" | ||
__copyright__ = "Copyright Ian Xia" |
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,13 @@ | ||
import richka | ||
|
||
__VERSION = ("Alpha", 0, 0, 1) | ||
USER_AGENT = f"Richka{__VERSION[0]}/{__VERSION[1]}.{__VERSION[2]}.{__VERSION[3]}" | ||
HEADERS = {"user-agent": USER_AGENT} | ||
|
||
def set_user_agent(user_agent: str) -> None: | ||
richka.USER_AGENT = user_agent | ||
richka.HEADERS["user-agent"] = user_agent | ||
|
||
def set_headers(headers: dict) -> None: | ||
for key, value in headers.items(): | ||
richka.HEADERS[key.lower()] = value |
Empty file.
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,42 @@ | ||
import os | ||
import sys | ||
|
||
from setuptools import setup, find_packages | ||
|
||
about = {} | ||
here = os.path.abspath(os.path.dirname(__file__)) | ||
with open(os.path.join(here, "richka", "__version__.py"), "r") as f: | ||
exec(f.read(), about) | ||
|
||
with open("README.md", "r") as f: | ||
readme = f.read() | ||
|
||
if sys.argv[-1] == "publish": | ||
os.system("python setup.py sdist bdist_wheel") | ||
os.system("twine upload dist/*") | ||
sys.exit() | ||
|
||
setup( | ||
name=about["__title__"], | ||
version=about["__version__"], | ||
description=about["__description__"], | ||
packages=find_packages(), | ||
url=about["__url__"], | ||
license=about["__license__"], | ||
author=about["__author__"], | ||
author_email=about["__author_email__"], | ||
long_description_content_type="text/markdown", | ||
long_description=readme, | ||
install_requires=[ | ||
], | ||
classifiers=[ | ||
'License :: OSI Approved :: MIT License', | ||
'Programming Language :: Python :: 3.9', | ||
'Programming Language :: Python :: 3 :: Only', | ||
], | ||
entry_points={ | ||
'console_scripts': ['richka=richka.__main__:main'], | ||
}, | ||
package_data={'': ['README.md']}, | ||
include_package_data=True, | ||
zip_safe=False) |