Skip to content

Modernization proposal #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
__pycache__/
build/
dist/
env*/

*.egg-info
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,29 @@
Do you want to know how to build a complete Python package? Well, look no further! This video will take you step-by-step through the entire process, from creating your project to publishing it on PyPI.

Video: https://youtu.be/5KEObONUkik.


---
*The below section is the actual content of the README.md file if this repository wouldn't exist as the basis of a youtube video.*

# ID Generator
A package used to generate random ids of variable lengths and types.

## How to use
_After installing the package use following import:_ <br>

**from idgenerator import generate_password,generate_guid,generate_credit_card_number,
generate_pin_number,
generate_object_id**

_Then use following commands:_

**password = generate_password(length= 'your_desired_length')<br>**

**guid = generate_guid()<br>**

**credit_card_number = generate_credit_card_number(length='your_desired_length') <br>**

**pin = generate_pin_number(length='your_desired_length') <br>**

**objid = generate_object_id() <br>**
21 changes: 0 additions & 21 deletions app/README.md

This file was deleted.

Empty file removed app/idgenerator/src/__init__.py
Empty file.
Empty file removed app/idgenerator/test/__init__.py
Empty file.
38 changes: 38 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "idgenerator"
version = "0.0.10"
description = "An id generator that generated various types and lengths ids"
readme = {file = "README.md", content-type = "text/markdown"}
authors = [
{name = "ArjanCodes", email = "[email protected]"},
]
license = {text = "MIT"}
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.10",
"Operating System :: OS Independent",
]
dependencies = [
"bson >= 0.5.10",
]
requires-python = ">=3.10"

# BETA-feature "Automatic discovery"
# Leaving out any information about the package structure to enable automatic discovery. src-layout works out of the box
# https://setuptools.pypa.io/en/latest/userguide/package_discovery.html#automatic-discovery

[project.urls]
homepage = "https://www.youtube.com/@ArjanCodes"
documentation = "https://github.com/ArjanCodes/2023-package"
repository = "https://github.com/ArjanCodes/2023-package"

[project.optional-dependencies]
dev = [
"pytest>=7.0",
"twine>=4.0.2",
"build",
]
28 changes: 0 additions & 28 deletions setup.py

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .src.idgenerator import (
from idgenerator.idgenerator import (
generate_password,
generate_guid,
generate_object_id,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import unittest
import string
from ..src.idgenerator import (
from idgenerator import (
generate_password,
generate_guid,
generate_credit_card_number,
generate_object_id,
generate_pin_number,
)
from ..src.utils import luhn_checksum
from idgenerator.utils import luhn_checksum


class GeneratorTest(unittest.TestCase):
Expand Down