Skip to content

Commit b49668e

Browse files
authored
Update README.md
1 parent 8cf1210 commit b49668e

File tree

1 file changed

+27
-11
lines changed

1 file changed

+27
-11
lines changed

README.md

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
[![Supported Versions](https://img.shields.io/pypi/pyversions/generateApiKey.svg)](https://pypi.org/project/YoutubeTags)
33
![GitHub](https://img.shields.io/github/license/nuhmanpk/generate-api-key)
44
![PyPI](https://img.shields.io/pypi/v/generateApiKey)
5-
[![Documentation Status](https://readthedocs.org/projects/generateApiKey/badge/?version=latest)](https://generateApiKey.readthedocs.io/en/latest/?badge=latest)
65
![PyPI - Downloads](https://img.shields.io/pypi/dm/generateApiKey)
76
[![Downloads](https://static.pepy.tech/personalized-badge/generateApiKey?period=week&units=international_system&left_color=grey&right_color=brightgreen&left_text=Downloads/Week)](https://pepy.tech/project/generateApiKey)
87
[![Upload to PIP](https://github.com/nuhmanpk/generate-api-key/actions/workflows/pypi-upload.yml/badge.svg?branch=main&event=workflow_dispatch)](https://github.com/nuhmanpk/generate-api-key/actions/workflows/Pypi-uploads.yml)
@@ -48,26 +47,40 @@ from generateApiKey import generateApiKey
4847
# Generating an API key
4948
To generate an API key, you can use the generateApiKey() function and pass in the secret, seed, and an optional include keyword. For example:
5049

50+
### Without Dashes
51+
5152
```python
5253
from generateApiKey import generateApiKey
5354

5455
seed='12'
5556
secret='Topsecrect'
56-
api_key= await generateApiKey(secret,seed)
57+
api_key= await generateApiKey(secret,seed) # KaEQfEOP0ZMXbkgElkuPRv6iUrMxQDytwrQPKhH0eO8
5758
print(api_key)
5859
```
5960

6061

6162
```python
6263
from generateApiKey import generateApiKey
63-
api_key = await generateApiKey(secret='Topsecret', seed='12',include='user1')
64+
api_key = await generateApiKey(secret='Topsecret', seed='12',include='user1') # iFuOcas8lSCw8jKWVIg4ru9WXhfr8erl5YzWc8kQw
6465
print(api_key)
6566
```
67+
### With Dashes
6668

6769
```python
6870
from generateApiKey import generateApiKey
69-
api_key = await generateApiKey(secret='Topsecret', seed='12',include='user1',add_dashes=True)
71+
api_key = await generateApiKey(secret='Topsecret', seed='12',
72+
include='user1',add_dashes=True) # 1ff0f93f-c14d-5768-b324-626f1099948b
73+
print(api_key)
74+
```
75+
### With prefix
76+
77+
```python
78+
seed='12'
79+
secret='Topsecrect'
80+
api_key=await generateApiKey(secret,seed,
81+
prefix='hf',add_dashes=True) # hf-db27e2d7-d0bb-5014-9f75-4c2fda33f727
7082
print(api_key)
83+
7184
```
7285

7386

@@ -105,12 +118,13 @@ else:
105118
```
106119
# Parameters
107120

108-
| **Variable** | **Type** | **Required** | **Example Value** | Description |
109-
|----------|---------|-----------|--------------------|-------------|
110-
| secret | `String` | Yes | "Topsecret" | The secret key used to generate the API key. It should be kept private and not shared with unauthorized parties. |
111-
| seed | `String` | Yes | "12" | A value used to seed the generation of the API key. It can be any value, but it should be unique for each key. |
112-
| include | `String` | Optional | "user1" | An optional value that can be included in the generated API key. It can be used to identify the user or application associated with the key. |
113-
| add_dashes | `boolean` | Optional | True | A value used to determine wheather to add dashes or not in a key |
121+
| **Variable** | **Type** | **Required** | **Example Value** | **Default** | **Description** |
122+
|----------|---------|-----------|--------------------|-------------|-------------------|
123+
| secret | `String` | Yes | "Topsecret" | - | The secret key used to generate the API key. It should be kept private and not shared with unauthorized parties. |
124+
| seed | `String` | Yes | "12" | - | A value used to seed the generation of the API key. It can be any value, but it should be unique for each key. |
125+
| include | `String` | Optional | "user1" | - | An optional value that can be included in the generated API key. It can be used to identify the user or application associated with the key. |
126+
| add_dashes | `boolean` | Optional | True | False | A value used to determine wheather to add dashes or not in a key |
127+
| prefix | `String` | Optional | "hf" | None | A Value that is added infornt of the apikey generted to make your key unique for your platform |
114128

115129

116130
By using this package, you are solely liable for any legal issues that may arise from its unauthorized use or misuse, as well as any security risks that may result from not properly securing the secret key used to generate the API keys.
@@ -121,4 +135,6 @@ This package is provided as is, without any warranties or guarantees of any kind
121135

122136
We encourage you to use the package responsibly, and to report any security issues or bugs you may encounter.
123137

124-
[Nuhman Pk](https://github.com/nuhmanpk)
138+
139+
140+
**Happy coding! 🚀**

0 commit comments

Comments
 (0)