Skip to content

Commit

Permalink
feat: release v0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
samdoghor committed Jan 23, 2024
1 parent 9f559c2 commit 0f82e5f
Show file tree
Hide file tree
Showing 10 changed files with 67 additions and 12 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Install `Myte` once without a virtual environment so it would be available to bo
### How to start your web project in any of the frameworks

- Create a virtual environment
- Activate the virtual environment
- Run the code below

```Bash Copy
Expand All @@ -54,7 +55,7 @@ myte start project
$ myte start project

Compatible Note:
Myte requires at least Python 3.11. However, the tool may still work
Myte requires at least Python 3.8. However, the tool may still work
fine in lower versions. If you encounter any error, do well to report
them here https://cutt.ly/1wSR7LW0
Thank you
Expand Down Expand Up @@ -106,7 +107,7 @@ and run the pip instructions there
$ myte start project

Compatible Note:
Myte requires at least Python 3.11. However, the tool may still work
Myte requires at least Python 3.8. However, the tool may still work
fine in lower versions. If you encounter any error, do well to report
them here https://cutt.ly/1wSR7LW0
Thank you
Expand Down
1 change: 1 addition & 0 deletions myte/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from .main import main
from .constants import template_folder, current_dir
from .setup_project import SetupProject
from .create_project import CreateProject
Expand Down
2 changes: 1 addition & 1 deletion myte/create_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from rich import print as mprint
from rich.console import Console
from rich.text import Text
from secret_key_generator import GenerateSecretKey
from utils import GenerateSecretKey


class CreateProject:
Expand Down
4 changes: 4 additions & 0 deletions myte/setup_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from delete_project import DeleteProject
from rich import print as mprint
from rich.prompt import Prompt
from utils import UKeyboardInterrupt


class SetupProject:
Expand Down Expand Up @@ -46,6 +47,9 @@ def project_setup():

mprint(f"[green] ✅ {selected_framework['framework']}, selected [/green]") # noqa
mprint("\n")
except UKeyboardInterrupt as e:
mprint(f"{e.message}") # noqa
raise typer.Abort()
except KeyboardInterrupt as e:
mprint(f"The Programme was terminated due to {e} Error") # noqa
raise typer.Abort()
Expand Down
2 changes: 2 additions & 0 deletions myte/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from .errors import UKeyboardInterrupt
from .secret_key_generator import GenerateSecretKey
2 changes: 1 addition & 1 deletion utils/errors.py → myte/utils/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"""


class KeyboardInterrupt(Exception):
class UKeyboardInterrupt(Exception):
""" This class represents Keyboard Interruption """

def __init__(self) -> None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@


import secrets
import string


class GenerateSecretKey:
""" This class is use to generate secret key to be used for security
purposes """

def generate_secret_key(length=32):
def generate_secret_key():
""" The function generates a 32 character secret key """

alphabet = string.ascii_letters + string.digits
secret_key = ''.join(secrets.choice(alphabet) for _ in range(length))
length = 32
secret_key = secrets.token_urlsafe(length)

return secret_key
30 changes: 27 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "Myte"
name = "Myte"
version = "0.0.1"
dependencies = [
"typer",
"inquirer",
]
authors = [
{ name="Samuel Doghor", email="talkto@samdoghor.com" },
]
description = "Myte allows users to choose from popular web frameworks like Flask, FastAPI, and Tornado etc when initializing a new project. After entering a project name, the user selects their preferred framework which then generates the basic directory structure and boilerplate code to get started."
readme = "README.md"
requires-python = ">=3.8"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Intended Audience :: Developers",
"Topic :: Software Development :: Boilerplate",
"Environment :: Console",
]
keywords = ["Myte", "Flask", "FastAPI", "Tornado", "Bottle", "Pyramid", "CherryPy", "Boilerplate", "Python web framework", "Project bootstrapping", "Framework"]

[project.urls]
Homepage = "https://github.com/samdoghor/myte"
Issues = "https://github.com/samdoghor/myte/issues"
24 changes: 24 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[metadata]
name = Myte
version = 0.0.1
author = Samuel Doghor
author_email = talkto@samdoghor.com
description = Myte allows users to choose from popular web frameworks like Flask, FastAPI, and Tornado etc when initializing a new project
long_description = file: README.rst, CHANGELOG.rst, LICENSE.rst
keywords = one, two
license = MIT License
license_files = LICENSE
keywords = Myte, Flask, FastAPI, Tornado, Bottle, Pyramid, CherryPy, Boilerplate, Python web framework, Project bootstrapping, Framework


[options]
packages = find:
python_requires = >=3.8
include_package_data = True
install_requires =
typer
inquirer

[options.entry_points]
console_scripts =
myte-start = myte.main:main
1 change: 0 additions & 1 deletion utils/__init__.py

This file was deleted.

0 comments on commit 0f82e5f

Please sign in to comment.