Skip to content
This repository was archived by the owner on Apr 24, 2025. It is now read-only.

Commit b349cb9

Browse files
README.md on project overview
1 parent 3ebefba commit b349cb9

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

projects/url_shortener/README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# URL Shortener
2+
3+
## Goal is to have a resuable class that engineers can use or copy/paste into their apps for shortening URLs. Engineer will be able to use any shortening library of their choice. In my example I will be using `pyshorteners`. I will also build an example with bringing a different library into the codebase.
4+
5+
## Using url shortener within this project
6+
7+
### setup
8+
1. Navigate to `projects\url_shortener`
9+
2. Create virtual environment `python -m venv venv`
10+
3. Activate virtual environment (I am on windows, different on MacOs) `venv\Scripts\activate`
11+
4. `pip install -r requirements.txt`
12+
13+
### execution
14+
1. `python app/main.py`
15+
16+
### example of execution via terminal
17+
```
18+
(venv) python-beginner-projects\projects\url_shortener>`python app/main.py`
19+
Enter the URL you want to shorten: https://www.bing.com/search?q=bing&cvid=e42b0995bcd045849a216437b88847be&gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIGCAEQRRg8MgYIAhBFGDwyBggDEEUYPDIGCAQQRRg8MgYIBRBFGDzSAQczOTlqMGo0qAIIsAIB&FORM=ANAB01&PC=U531
20+
Shortened URL: https://tinyurl.com/275h2qwv
21+
```
22+
23+
### Extras
24+
I built code quality tools into project (linting, formatting, type annotation checks)
25+
26+
1. `ruff check .` - linter
27+
2. `ruff check --fix` - fix linting
28+
3. `ruff format` - formatting
29+
4. `mypy .` - type annotation checking

0 commit comments

Comments
 (0)