# subhangpack
hello
namegen
[![Upload Python Package](https://github.com/Subhangmokkarala/subhangpack/actions/workflows/python-publish.yml/badge.svg)](https://github.com/Subhangmokkarala/subhangpack/actions/workflows/python-publish.yml)
## to install
```bash
pip install subhangpack
```
## to use
```python
from subhangpack import namegen
```
## to generate a random name
```python
namegen.gen()
```
## to generate from terminal
```bash
subhangpack-devicename
```
# pip package for generating random names for homelab and network devices
# noobs guide for making a pip package
### 0. Install pip
```bash
sudo apt install python3-pip
```
### install libraries
```bash
pip install wheel
pip install setuptools
```
### 1. Make a new folder and cd into it which will be the name of your package
```bash
mkdir yourpackagename
cd yourpackagename
```
### 2. Make a init.py file in the folder
```bash
touch __init__.py
```
### 3. Make a py file which will be the main file of your package to say what your package does
```bash
touch namegen.py
```
### 4. add your module code in the py file to make it work
```python
#write your code here
```
### 5. import your module in the init.py file to say that it is a package
```python
from .namegen import *
```
### 6. Make a setup.py file
```bash
touch setup.py
```
### 7. Add the following code in the setup.py file
```python
from setuptools import setup
setup(name='yourpackagename',
version='0.1',
description='write a description here',
url='
author='your name',
author_email='your email',
license='MIT',
packages=['yourpackagename'],
zip_safe=False)
```
### 8. now package your module for source distribution
```bash
python setup.py sdist
```
### 9. now use wheel to package your module for build distribution
```bash
python setup.py bdist_wheel
```
### 10. now install your module to test it locally before publishing it to pypi
```bash
pip install yourpackagename.whl
```
### 11. now you can use your module in any python file
```python
import yourpackagename
```
### 12. now you can upload your module to pypi
```bash
pip install twine
```
### 13. now upload your module to pypi
```bash
twine upload dist/*
```
### 14. now you can install your module from pypi
```bash
pip install yourpackagename
```
# tada you have made your first pip package
Raw data
{
"_id": null,
"home_page": "",
"name": "subhangpack",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "python,name,beginner,generator,device,random,fun,subhangpack,subhang,mokkarala,subhangmokkarala",
"author": "SubhangMokkarala",
"author_email": "subhangmokkarala@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/63/e7/25269982f2e970979a111b921abf5f4ae8123d0067a975094e25c15d2d6b/subhangpack-1.1.0.tar.gz",
"platform": null,
"description": "# subhangpack\nhello\nnamegen\n\n[![Upload Python Package](https://github.com/Subhangmokkarala/subhangpack/actions/workflows/python-publish.yml/badge.svg)](https://github.com/Subhangmokkarala/subhangpack/actions/workflows/python-publish.yml)\n\n## to install\n```bash\npip install subhangpack\n```\n## to use\n```python\nfrom subhangpack import namegen\n```\n## to generate a random name\n```python\nnamegen.gen()\n```\n## to generate from terminal\n```bash\nsubhangpack-devicename\n```\n\n# pip package for generating random names for homelab and network devices\n\n# noobs guide for making a pip package\n\n### 0. Install pip\n```bash\nsudo apt install python3-pip\n```\n### install libraries\n```bash \npip install wheel\npip install setuptools\n```\n### 1. Make a new folder and cd into it which will be the name of your package\n```bash\nmkdir yourpackagename\ncd yourpackagename\n```\n### 2. Make a init.py file in the folder \n```bash\ntouch __init__.py\n```\n### 3. Make a py file which will be the main file of your package to say what your package does\n```bash\ntouch namegen.py\n```\n### 4. add your module code in the py file to make it work\n```python \n#write your code here\n```\n### 5. import your module in the init.py file to say that it is a package \n```python\nfrom .namegen import *\n```\n### 6. Make a setup.py file\n```bash\ntouch setup.py\n```\n### 7. Add the following code in the setup.py file\n```python\nfrom setuptools import setup\n\nsetup(name='yourpackagename',\n version='0.1',\n description='write a description here',\n url='\n author='your name',\n author_email='your email',\n license='MIT',\n packages=['yourpackagename'],\n zip_safe=False)\n```\n### 8. now package your module for source distribution\n```bash\npython setup.py sdist\n```\n### 9. now use wheel to package your module for build distribution\n```bash\npython setup.py bdist_wheel\n```\n### 10. now install your module to test it locally before publishing it to pypi\n```bash\npip install yourpackagename.whl\n```\n### 11. now you can use your module in any python file\n```python\nimport yourpackagename\n```\n### 12. now you can upload your module to pypi\n```bash\npip install twine\n```\n### 13. now upload your module to pypi\n```bash\ntwine upload dist/*\n```\n### 14. now you can install your module from pypi\n```bash\npip install yourpackagename\n```\n\n# tada you have made your first pip package\n\n",
"bugtrack_url": null,
"license": "",
"summary": "nah you just started",
"version": "1.1.0",
"project_urls": null,
"split_keywords": [
"python",
"name",
"beginner",
"generator",
"device",
"random",
"fun",
"subhangpack",
"subhang",
"mokkarala",
"subhangmokkarala"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0425968e90388fc47791764e9e208e0347b3aef9675453e5b8029b2d7e5d44c0",
"md5": "be19294fc9ece1df1877f298539095cc",
"sha256": "07295dbd6d4ac7ef1ce11213f50e25b56c26d037772d52869a7921ece875d313"
},
"downloads": -1,
"filename": "subhangpack-1.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "be19294fc9ece1df1877f298539095cc",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 4644,
"upload_time": "2024-01-20T15:34:07",
"upload_time_iso_8601": "2024-01-20T15:34:07.509987Z",
"url": "https://files.pythonhosted.org/packages/04/25/968e90388fc47791764e9e208e0347b3aef9675453e5b8029b2d7e5d44c0/subhangpack-1.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "63e725269982f2e970979a111b921abf5f4ae8123d0067a975094e25c15d2d6b",
"md5": "96cb7af13b854c4fbb2ceccae2ae9356",
"sha256": "43c37404ef66f2efd25e77219fcb2fd4b43c4fe78714e3a0f328906198505883"
},
"downloads": -1,
"filename": "subhangpack-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "96cb7af13b854c4fbb2ceccae2ae9356",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3848,
"upload_time": "2024-01-20T15:34:09",
"upload_time_iso_8601": "2024-01-20T15:34:09.761054Z",
"url": "https://files.pythonhosted.org/packages/63/e7/25269982f2e970979a111b921abf5f4ae8123d0067a975094e25c15d2d6b/subhangpack-1.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-20 15:34:09",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "subhangpack"
}