v2kit 0.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
v2kit-0.0.0/AUTHORS.md ADDED
@@ -0,0 +1,14 @@
1
+ # Core Developers
2
+ ----------
3
+ - AmirHosein Rostami - Open Science Laboratory ([Github](https://github.com/AHReccese)) **
4
+ - Sepand Haghighi - Open Science Laboratory ([Github](https://github.com/sepandhaghighi))
5
+
6
+ ** **Maintainer**
7
+
8
+ # Other Contributors
9
+ ----------
10
+ - [@boreshnavard](https://github.com/boreshnavard) ++
11
+ - [@sadrasabouri](https://github.com/sadrasabouri)
12
+
13
+
14
+ ++ Graphic designer
v2kit-0.0.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 OpenSciLab
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
v2kit-0.0.0/PKG-INFO ADDED
@@ -0,0 +1,25 @@
1
+ Metadata-Version: 2.1
2
+ Name: v2kit
3
+ Version: 0.0.0
4
+ Summary: This name has been reserved using Reserver
5
+ Home-page: https://url.com
6
+ Download-URL: https://download_url.com
7
+ Author: Development Team
8
+ Author-email: test@test.com
9
+ License: MIT
10
+ Project-URL: Source, https://github.com/source
11
+ Keywords: python3 python reserve reserver reserved
12
+ Classifier: Development Status :: 1 - Planning
13
+ Classifier: Programming Language :: Python :: 3.6
14
+ Classifier: Programming Language :: Python :: 3.7
15
+ Classifier: Programming Language :: Python :: 3.8
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Requires-Python: >=3.6
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ License-File: AUTHORS.md
24
+
25
+ This name has been reserved using [Reserver](https://github.com/openscilab/reserver).
v2kit-0.0.0/README.md ADDED
@@ -0,0 +1,157 @@
1
+ <div align="center">
2
+ <img src="https://github.com/openscilab/reserver/raw/main/otherfiles/reserver.png" width="300" height="300">
3
+ <br/>
4
+ <br/>
5
+ <a href="https://codecov.io/gh/openscilab/reserver"><img src="https://codecov.io/gh/openscilab/reserver/branch/main/graph/badge.svg" alt="Codecov"/></a>
6
+ <a href="https://badge.fury.io/py/reserver"><img src="https://badge.fury.io/py/reserver.svg" alt="PyPI version"></a>
7
+ <a href="https://www.python.org/"><img src="https://img.shields.io/badge/built%20with-Python3-green.svg" alt="built with Python3"></a>
8
+ <a href="https://github.com/openscilab/reserver"><img alt="GitHub repo size" src="https://img.shields.io/github/repo-size/openscilab/reserver"></a>
9
+ <a href="https://discord.gg/RD2y6SGuY3"><img src="https://img.shields.io/discord/1064533716615049236.svg" alt="Discord Channel"></a>
10
+ </div>
11
+
12
+ ----------
13
+
14
+ ## Disclaimer
15
+ **⚠️ Warning ⚠️**
16
+
17
+ <p align="justify">
18
+
19
+ The intention of this package is facilitating the reservation of package names on PyPI for legitimate and appropriate purposes. We explicitly disclaim any responsibility for the misuse or spamming of this tool, particularly in the excessive reservation of package names. Users are advised to be cautious and ensure the legitimate use of this package to avoid potential consequences such as the suspension of their PyPI account. By using this package, users acknowledge and agree to these terms.
20
+ </p>
21
+
22
+ ## Overview
23
+ <p align="justify">
24
+ Reserver is an open source Python package that offers the ability to quickly reserve a PyPI package name. Got a notion? Before it's taken, immediately reserve the product name!
25
+ </p>
26
+ <table>
27
+ <tr>
28
+ <td align="center">PyPI Counter</td>
29
+ <td align="center">
30
+ <a href="https://pepy.tech/projects/reserver">
31
+ <img src="https://static.pepy.tech/badge/reserver" alt="PyPI Downloads">
32
+ </a>
33
+ </td>
34
+ </tr>
35
+ <tr>
36
+ <td align="center">Github Stars</td>
37
+ <td align="center">
38
+ <a href="https://github.com/openscilab/reserver">
39
+ <img src="https://img.shields.io/github/stars/openscilab/reserver.svg?style=social&label=Stars">
40
+ </a>
41
+ </td>
42
+ </tr>
43
+ </table>
44
+ <table>
45
+ <tr>
46
+ <td align="center">Branch</td>
47
+ <td align="center">main</td>
48
+ <td align="center">dev</td>
49
+ </tr>
50
+ <tr>
51
+ <td align="center">CI</td>
52
+ <td align="center">
53
+ <img src="https://github.com/openscilab/reserver/actions/workflows/test.yml/badge.svg?branch=main">
54
+ </td>
55
+ <td align="center">
56
+ <img src="https://github.com/openscilab/reserver/actions/workflows/test.yml/badge.svg?branch=dev">
57
+ </td>
58
+ </tr>
59
+ </table>
60
+
61
+
62
+ ## Installation
63
+
64
+ ### PyPI
65
+
66
+ - Check [Python Packaging User Guide](https://packaging.python.org/installing/)
67
+ - Run `pip install reserver==0.3`
68
+ ### Source code
69
+ - Download [Version 0.3](https://github.com/openscilab/reserver/archive/v0.3.zip) or [Latest Source](https://github.com/openscilab/reserver/archive/dev.zip)
70
+ - Run `pip install .`
71
+
72
+ ## Usage
73
+
74
+ ### Programmatically
75
+ Reserve a package name in main PyPI (pypi.org)
76
+ ```python
77
+ from reserver import PyPIUploader
78
+ uploader = PyPIUploader(PYPI_TOKEN, test_pypi=False)
79
+ uploader.upload("CONSIDERED_NAME_FOR_YOUR_PACKAGE")
80
+ ```
81
+ Reserve batch of names with custom user-defined parameters in test PyPI (test.pypi.org)
82
+ ```python
83
+ uploader = PyPIUploader(TEST_PYPI_TOKEN, test_pypi=True)
84
+ uploader.batch_upload(["PACKAGE_NAME_1", "PACKAGE_NAME_2"], ["config1.json", "config2.json"])
85
+ ```
86
+ ### CLI
87
+ ℹ️ You can use `reserver` or `python -m reserver` to run this program
88
+ #### Version
89
+ ```console
90
+ reserver -v
91
+ reserver --version
92
+ ```
93
+ #### Reserve in test PyPI (test.pypi.org)
94
+ ```console
95
+ reserver --name sample_name1 sample_name2 --token=TEST_PYPI_TOKEN --test
96
+ ```
97
+ #### Reserve in main PyPI (pypi.org)
98
+ ```console
99
+ reserver --name sample_name1 sample_name2 --token=PYPI_TOKEN
100
+ ```
101
+ #### Customizing package parameters
102
+
103
+ You can customize the following package parameters for reservations on PyPI using the Reserver CLI. The details and defaults are provided in the table below.
104
+
105
+ | Parameter | Type | Default | Description |
106
+ |---|---|---|---|
107
+ | `description` | string | `This name has been reserved using Reserver` | A short description of your PyPI package name reservation. |
108
+ | `author` | string | `Development Team` | The name of the author or development team. |
109
+ | `author_email` | email address | `test@test.com` | An email address for contact. |
110
+ | `url` | web address | `https://url.com` | The project's main repository URL. |
111
+ | `download_url` | web address | `https://download_url.com` | The download URL for the package. |
112
+ | `source` | web address | `https://github.com/source` | The source code repository URL. |
113
+ | `license` | string | `MIT` | The license under which your package is distributed. |
114
+
115
+ There are two ways to define these custom parameters:
116
+
117
+ **1. Single `param.json` for all packages:**
118
+
119
+ This approach uses a single JSON file (`param.json`) to define common parameters for all packages. This file could hold information like those described in the table.
120
+
121
+ Here's how to use this method:
122
+
123
+ ```console
124
+ reserver --name sample_name1 sample_name2 --param config.json --token=PYPI_TOKEN
125
+ ```
126
+ **2. Dedicated `param.json` per package:**
127
+
128
+ This approach allows for more customization by having a separate JSON file for each package. Each file would contain parameters specific to that particular package.
129
+
130
+ Here's how this method works:
131
+
132
+ ```console
133
+ reserver --name sample_name1 sample_name2 --param name1_param.json name2_param.json --token=PYPI_TOKEN
134
+ ```
135
+
136
+ Choose the method that best suits your needs. Using a single `param.json` is efficient for packages with similar information, while separate files offer more granular control.
137
+
138
+ ℹ️ You can use all available features on both `pypi.org` and `test.pypi.org`.
139
+ ## Issues & bug reports
140
+
141
+ Just fill an issue and describe it. We'll check it ASAP! or send an email to [reserver@openscilab.com](mailto:reserver@openscilab.com "reserver@openscilab.com").
142
+
143
+ - Please complete the issue template
144
+
145
+ You can also join our discord server
146
+
147
+ <a href="https://discord.gg/RD2y6SGuY3"><img src="https://img.shields.io/discord/1064533716615049236.svg?style=for-the-badge" alt="Discord Channel"></a>
148
+
149
+ ## Show your support
150
+
151
+ ### Star this repo
152
+ Give a ⭐️ if this project helped you!
153
+
154
+ ### Donate to our project
155
+ If you do like our project and we hope that you do, can you please support us? Our project is not and is never going to be working for profit. We need the money just so we can continue doing what we do ;-) .
156
+
157
+ <a href="https://openscilab.com/#donation" target="_blank"><img src="https://github.com/openscilab/reserver/raw/main/otherfiles/donation.png" height="90px" width="270px" alt="Reserver Donation"></a>
v2kit-0.0.0/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
v2kit-0.0.0/setup.py ADDED
@@ -0,0 +1,73 @@
1
+ # -*- coding: utf-8 -*-
2
+ """Setup module."""
3
+ try:
4
+ from setuptools import setup
5
+ except ImportError:
6
+ from distutils.core import setup
7
+
8
+
9
+ def get_requires():
10
+ """Read requirements.txt."""
11
+ requirements = open("requirements.txt", "r").read()
12
+ return list(filter(lambda x: x != "", requirements.split()))
13
+
14
+
15
+ def read_description():
16
+ """Read README.md and CHANGELOG.md."""
17
+ try:
18
+ with open("README.md") as r:
19
+ description = "\n"
20
+ description += r.read()
21
+ with open("CHANGELOG.md") as c:
22
+ description += "\n"
23
+ description += c.read()
24
+ return description
25
+ except Exception:
26
+ return '''PyPI Package Name Reserver'''
27
+
28
+
29
+ setup(
30
+ name='reserver',
31
+ packages=['reserver',],
32
+ version='0.3',
33
+ description='PyPI package name reserver',
34
+ long_description=read_description(),
35
+ long_description_content_type='text/markdown',
36
+ author='Reserver Development Team',
37
+ author_email='reserver@openscilab.com',
38
+ url='https://github.com/openscilab/reserver',
39
+ download_url='https://github.com/openscilab/reserver/tarball/v0.3',
40
+ keywords="pypi pip package name reserve reserver reservation python",
41
+ project_urls={
42
+ 'Source': 'https://github.com/openscilab/reserver',
43
+ },
44
+ install_requires=get_requires(),
45
+ python_requires='>=3.6',
46
+ classifiers=[
47
+ 'Development Status :: 3 - Alpha',
48
+ 'Intended Audience :: Developers',
49
+ 'Natural Language :: English',
50
+ 'License :: OSI Approved :: MIT License',
51
+ 'Operating System :: OS Independent',
52
+ 'Programming Language :: Python :: 3.6',
53
+ 'Programming Language :: Python :: 3.7',
54
+ 'Programming Language :: Python :: 3.8',
55
+ 'Programming Language :: Python :: 3.9',
56
+ 'Programming Language :: Python :: 3.10',
57
+ 'Programming Language :: Python :: 3.11',
58
+ 'Programming Language :: Python :: 3.12',
59
+ 'Programming Language :: Python :: 3.13',
60
+ 'Intended Audience :: Developers',
61
+ 'Intended Audience :: Education',
62
+ 'Intended Audience :: End Users/Desktop',
63
+ 'Intended Audience :: Manufacturing',
64
+ 'Intended Audience :: Science/Research',
65
+
66
+ ],
67
+ license='MIT',
68
+ entry_points={
69
+ 'console_scripts': [
70
+ 'reserver = reserver.__main__:main',
71
+ ]
72
+ }
73
+ )
@@ -0,0 +1,47 @@
1
+ import os
2
+ from reserver import PyPIUploader
3
+ from reserver.reserver_func import get_random_name
4
+
5
+ pypi_token = os.environ.get("TWINE_PASSWORD")
6
+ test_pypi_token = os.environ.get("TWINE_TEST_PASSWORD")
7
+
8
+ def test_package_exists():
9
+ # test reserved name
10
+ uploader = PyPIUploader(test_pypi_token, test_pypi=True)
11
+ assert uploader.upload("numpy") == False
12
+
13
+ def test_standard_module_conflict():
14
+ # try to reserve a standard python library module
15
+ uploader = PyPIUploader(test_pypi_token, test_pypi=True)
16
+ assert uploader.upload("os") == False
17
+
18
+ def test_valid_package_invalid_credentials():
19
+ # test not reserved name -> wrong credentials
20
+ uploader = PyPIUploader("pypi-wrong-api-token", test_pypi=True)
21
+ assert uploader.upload(get_random_name()) == False
22
+
23
+ def test_valid_package_valid_credentials():
24
+ # test not reserved name -> correct credentials
25
+ # uploader = PyPIUploader(test_pypi_token, test_pypi=True)
26
+ # assert uploader.upload(get_random_name()) == True
27
+ assert True == True
28
+
29
+ def test_module_conflict():
30
+ # try to reserve a name which conflicts with the module name of a previously taken package (the taken package itself has a different name, but it's module name has conflict)."
31
+ uploader = PyPIUploader(test_pypi_token, test_pypi=True)
32
+ assert uploader.upload("freeze") == False
33
+
34
+ def test_batch_packages_names():
35
+ # test batch of package names
36
+ uploader = PyPIUploader(test_pypi_token, test_pypi=True)
37
+ assert uploader.batch_upload(["numpy", "scikit-learn"]) == 0
38
+
39
+ def test_batch_upload():
40
+ # try to reserve two non taken package names with per package custom setup.py parameters
41
+ # make sure you are in "tests" directory
42
+ # uploader = PyPIUploader(test_pypi_token, test_pypi=True)
43
+ # assert uploader.batch_upload(
44
+ # [get_random_name(), get_random_name() + get_random_name()],
45
+ # ["config.json", "config2.json"]
46
+ # ) == 2
47
+ assert True == True
@@ -0,0 +1,2 @@
1
+ # -*- coding: utf-8 -*-
2
+ """v2kit modules."""
@@ -0,0 +1,25 @@
1
+ Metadata-Version: 2.1
2
+ Name: v2kit
3
+ Version: 0.0.0
4
+ Summary: This name has been reserved using Reserver
5
+ Home-page: https://url.com
6
+ Download-URL: https://download_url.com
7
+ Author: Development Team
8
+ Author-email: test@test.com
9
+ License: MIT
10
+ Project-URL: Source, https://github.com/source
11
+ Keywords: python3 python reserve reserver reserved
12
+ Classifier: Development Status :: 1 - Planning
13
+ Classifier: Programming Language :: Python :: 3.6
14
+ Classifier: Programming Language :: Python :: 3.7
15
+ Classifier: Programming Language :: Python :: 3.8
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Requires-Python: >=3.6
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ License-File: AUTHORS.md
24
+
25
+ This name has been reserved using [Reserver](https://github.com/openscilab/reserver).
@@ -0,0 +1,11 @@
1
+ AUTHORS.md
2
+ LICENSE
3
+ README.md
4
+ setup.py
5
+ v2kit_setup.py
6
+ tests/test_reserver.py
7
+ v2kit/__init__.py
8
+ v2kit.egg-info/PKG-INFO
9
+ v2kit.egg-info/SOURCES.txt
10
+ v2kit.egg-info/dependency_links.txt
11
+ v2kit.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ v2kit
@@ -0,0 +1,43 @@
1
+
2
+ import sys
3
+
4
+ try:
5
+ from setuptools import setup
6
+ except ImportError:
7
+ from distutils.core import setup
8
+
9
+ # invalid email
10
+ # download url
11
+ # url
12
+ # project urls
13
+
14
+ setup(
15
+ name ="v2kit",
16
+ packages=["v2kit",],
17
+ version='0.0.0',
18
+ description="This name has been reserved using Reserver",
19
+ long_description= "This name has been reserved using [Reserver](https://github.com/openscilab/reserver).",
20
+ long_description_content_type='text/markdown',
21
+ author="Development Team",
22
+ author_email="test@test.com",
23
+ url="https://url.com",
24
+ download_url="https://download_url.com",
25
+ keywords="python3 python reserve reserver reserved",
26
+ project_urls={
27
+ 'Source':"https://github.com/source",
28
+ },
29
+ install_requires="",
30
+ python_requires='>=3.6',
31
+ classifiers=[
32
+ 'Development Status :: 1 - Planning',
33
+ 'Programming Language :: Python :: 3.6',
34
+ 'Programming Language :: Python :: 3.7',
35
+ 'Programming Language :: Python :: 3.8',
36
+ 'Programming Language :: Python :: 3.9',
37
+ 'Programming Language :: Python :: 3.10',
38
+ 'Programming Language :: Python :: 3.11',
39
+ 'Programming Language :: Python :: 3.12',
40
+ ],
41
+ license="MIT",
42
+ )
43
+