Skip to content

Commit 97a1096

Browse files
authored
Merge pull request Py-Contributors#48 from codePerfectPlus/dev
updating cli
2 parents e04d452 + 6599c02 commit 97a1096

24 files changed

+638
-384
lines changed

.github/workflows/python-app.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ jobs:
1414
python -m pip install --upgrade pip
1515
pip install flake8
1616
- name: Lint with flake8
17-
run: flake8 . --isolated --exclude=.cache,.venv,.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,**/migrations/** --ignore=E203,W503,E501,F401
17+
run: flake8 . --isolated --exclude=.cache,.venv,.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,**/migrations/** --ignore=E501,E402

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. The format
44

55
## Changelog
66

7+
## [1.0.1] -
8+
9+
- server can be start from cli
10+
- More Endpoints exposed to the API/CLI
11+
- Code refactored
12+
13+
714
## [1.0.0] - 05-11-2022
815

916
- Beautiful command line output

CONTRIBUTING.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ We love your input! We want to make contributing to this project as easy and tra
5050

5151
- Create a PR from our repo on Github.
5252

53+
### Run Flake8
54+
55+
```sh
56+
flake8 . --isolated --ignore=E501,E402
57+
```
58+
5359
### Additional Notes
5460

5561
- Any changes should be made in the `dev` branch.

README.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<a href="https://pypi.org/project/random-profile/">
44
Random Profile Generator
55
</a>
6-
V1.0.0
6+
V1.0.1
77
</h1>
88

99
<h4 align="center">Python Module To Generate Random Profile Data</h4>
@@ -19,27 +19,34 @@
1919
<img src="https://img.shields.io/pypi/dw/random-profile.svg">
2020
<img src="https://img.shields.io/pypi/dm/random-profile.svg">
2121
</p>
22-
<p align="center">
22+
<p align="center">
2323

2424
<img alt="GitHub pull-requests" src="https://img.shields.io/github/issues-pr/Py-Contributors/RandomProfileGenerator">
2525

26-
<img alt="GitHub forks" src="https://img.shields.io/github/forks/Py-Contributors/RandomProfileGenerator">
26+
<img alt="GitHub forks" src="https://img.shields.io/github/forks/Py-Contributors/RandomProfileGenerator">
2727

28-
<img alt="contributors" src="https://img.shields.io/github/contributors/Py-Contributors/RandomProfileGenerator">
28+
<img alt="contributors" src="https://img.shields.io/github/contributors/Py-Contributors/RandomProfileGenerator">
2929

3030
<img alt="GitHub stars" src="https://img.shields.io/github/stars/Py-Contributors/RandomProfileGenerator"> </p>
3131

3232

3333
[RandomProfile](https://pypi.org/project/random-profile/) is a powerful and simple tool to generate fake data. You can use it to mock classes, populate databases and much more. You can check the full documentation here. Check on [Pypi](https://pypi.org/project/random-profile/)
3434

35+
```sh
36+
pip install random-profile
37+
```
3538

3639
## Documentation
3740

38-
Documentation is available at [ReadTheDocs](https://randomprofilegenerator.readthedocs.io/en/latest/)
41+
Full Documentation is available at [ReadTheDocs](https://randomprofilegenerator.readthedocs.io/en/latest/)
3942

4043
## Upcoming Features
4144

42-
- Support for more languages
45+
- More Data Fields
46+
- More Data Types
47+
- Make it more user friendly and easy to use
48+
- Make it more efficient and faster
49+
- Cython Support
4350

4451
## Changelog
4552

@@ -51,10 +58,14 @@ Check the [Contributing](/CONTRIBUTING.md) for the contribution guidelines.
5158

5259
## License
5360

54-
The project is licensed under the <a href="/LICENSE">MIT</a> license.
61+
The project is licensed under the <a href="/LICENSE">MIT</a> license.
5562

5663
## Contributors
5764

5865
<a href="https://github.com/codePerfectPlus/awesomeScripts/graphs/contributors">
5966
<img src="https://contrib.rocks/image?repo=codePerfectPlus/randomprofilegenerator" />
6067
</a>
68+
69+
## Sponsor
70+
71+
Email: [Pycontributors](mailto:[email protected]) for sponsorship details.

api/api.py

Lines changed: 0 additions & 118 deletions
This file was deleted.

api/requirements.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/assets/sample.png

120 KB
Loading

docs/command_line_usage.rst

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,81 +9,87 @@ Usages:
99

1010
.. code-block:: bash
1111
12-
random-profile --help
13-
Usage: random-profile [OPTIONS]
12+
rp --help or random_profile -h
13+
Usage: rp [OPTIONS]
1414
15-
random-profile -n 10 -p
15+
rp -n 10 -p
1616
1717
optional arguments:
18-
-h, --help show this help message and exit
19-
-n N Number of random profiles
20-
21-
-f, --fullname Get full name instead of first name
22-
-p, --profile Get full profile instead of first name
23-
-l, --lastname Get last name instead of first name
24-
-ip, --ipv4 Get an ipv4 IP address
25-
-j, --jobtitle Get job title
26-
18+
-h, --help show this help message and exit
19+
-v, --version show program's version number and exit
20+
--server Start server
21+
--port PORT Port number
22+
-n N Number of random profiles
23+
-p, --profile Get full profile
24+
-f, --firstname Get first name
25+
-l, --lastname Get last name instead of first name
26+
--fullname Get full name instead of first name
27+
--ip Get an ipv4 IP address
28+
--job Get job title
29+
--address Get address
30+
2731
Get Random Profile:
2832
-------------------
2933
3034
.. code-block:: bash
3135
3236
# n = number of random profiles, p = profile
33-
random_profile -n 10 -p
37+
rp -n 10 -p
3438
3539
Get First Name:
3640
---------------
3741
3842
.. code-block:: bash
3943
4044
# n = number of random profiles, f = first name
41-
random_profile -n 10 -f
45+
rp -n 10 -f
4246
4347
Get Last Name:
4448
--------------
4549
4650
.. code-block:: bash
4751
4852
# n = number of random profiles, l = last name
49-
random_profile -n 10 -l
53+
rp -n 10 -l
5054
5155
Get Job Title:
5256
--------------
5357
5458
.. code-block:: bash
5559
5660
# n = number of random profiles, j = job title
57-
random_profile -n 10 -j
61+
rp -n 10 -j
5862
5963
Get IPv4 Address:
6064
-----------------
6165
6266
.. code-block:: bash
6367
6468
# n = number of random profiles, ip = ipv4
65-
random_profile -n 10 -ip
69+
rp -n 10 -ip
70+
6671
6772
Get Random Profile and Save to File:
6873
------------------------------------
6974
7075
.. code-block:: bash
7176
7277
# n = number of random profiles, p = profile
73-
random_profile -n 10 -p > random_profiles.txt
78+
rp -n 10 -p > rps.txt
7479
7580
.. code-block:: bash
7681
7782
# save to a file
7883
# n = number of random profiles, p = profile
79-
random_profile -n 10 -p >> random_profiles.txt
84+
rp -n 10 -p >> rps.txt
8085
8186
8287
Get Random Profile version:
8388
---------------------------
8489
8590
.. code-block:: bash
8691
87-
random_profile --version
92+
rp --version
93+
94+
rp 0.2.3
8895
89-
random-profile 0.2.3

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
project = 'Random Profile Generator'
55
description = 'A random profile generator for testing purposes.'
66
author = 'Deeapk Raj'
7-
release = '0.2.3'
7+
release = '1.0.1'
88
year = datetime.now().year
99
copyright = "{} Deepak Raj".format(year)
1010
source_suffix = ".rst"

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ Contents:
5151
installation.rst
5252
command_line_usage.rst
5353
import_as_module.rst
54+
run_as_server.rst
5455
changelog.rst
5556
roadmap.rst
5657
run_test_cases.rst

0 commit comments

Comments
 (0)