-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* CLI samples of reserving package name(s) with customized package parameters added * `CHANGELOG.md` updated * add `batch_operation` in `Programmatical` usage * `autopep8.sh` applied * `README.md` updated * `README.md` updated * fix space issue in paths * `README.md` updated * doc : minor edit in README.md headers --------- Co-authored-by: sepandhaghighi <[email protected]>
- Loading branch information
1 parent
8ad30e9
commit 6b513aa
Showing
4 changed files
with
57 additions
and
12 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 |
---|---|---|
|
@@ -71,11 +71,17 @@ Reserver is an open source Python package that offers the ability to quickly | |
## Usage | ||
|
||
### Programmatically | ||
Reserve a package name in main PyPI (pypi.org) | ||
```python | ||
from reserver import PyPIUploader | ||
uploader = PyPIUploader(PYPI_API_TOKEN, test_pypi= False) | ||
uploader = PyPIUploader(PYPI_TOKEN, test_pypi=False) | ||
uploader.upload("CONSIDERED_NAME_FOR_YOUR_PACKAGE") | ||
``` | ||
Reserve batch of names with custom user-defined parameters in test PyPI (test.pypi.org) | ||
```python | ||
uploader = PyPIUploader(TEST_PYPI_TOKEN, test_pypi=True) | ||
uploader.batch_upload(["PACKAGE_NAME_1", "PACKAGE_NAME_2"], ["config1.json", "config2.json"]) | ||
``` | ||
### CLI | ||
⚠️ You can use `reserver` or `python -m reserver` to run this program | ||
#### Version | ||
|
@@ -85,13 +91,50 @@ reserver --version | |
``` | ||
#### Reserve in test PyPI (test.pypi.org) | ||
```console | ||
reserver --name sample_name1 sample_name2 --token=PYPI_TOKEN --test | ||
reserver --name sample_name1 sample_name2 --token=TEST_PYPI_TOKEN --test | ||
``` | ||
#### Reserve in main PyPI (pypi.org) | ||
```console | ||
reserver --name sample_name1 sample_name2 --token=PYPI_TOKEN | ||
``` | ||
#### Customizing package parameters | ||
|
||
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. | ||
|
||
| Parameter | Type | Default | Description | | ||
|---|---|---|---| | ||
| `description` | string | `This name has been reserved using Reserver` | A short description of your PyPI package name reservation. | | ||
| `author` | string | `Development Team` | The name of the author or development team. | | ||
| `author_email` | email address | `[email protected]` | An email address for contact. | | ||
| `url` | web address | `https://url.com` | The project's main repository URL. | | ||
| `download_url` | web address | `https://download_url.com` | The download URL for the package. | | ||
| `source` | web address | `https://github.com/source` | The source code repository URL. | | ||
| `license` | string | `MIT` | The license under which your package is distributed. | | ||
|
||
There are two ways to define these custom parameters: | ||
|
||
**1. Single `param.json` for all packages:** | ||
|
||
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. | ||
|
||
Here's how to use this method: | ||
|
||
```console | ||
reserver --name sample_name1 sample_name2 --param config.json --token=PYPI_TOKEN | ||
``` | ||
**2. Dedicated `param.json` per package:** | ||
|
||
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. | ||
|
||
Here's how this method works: | ||
|
||
```console | ||
reserver --name sample_name1 sample_name2 --param name1_param.json name2_param.json --token=PYPI_TOKEN | ||
``` | ||
|
||
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. | ||
|
||
⚠️ You can use all available features on both `pypi.org` and `test.pypi.org`. | ||
## Issues & bug reports | ||
|
||
Just fill an issue and describe it. We'll check it ASAP! or send an email to [[email protected]](mailto:[email protected] "[email protected]"). | ||
|
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