Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lexhouk/goit-pyweb-hw-02
Модуль 2. Python Development
https://github.com/lexhouk/goit-pyweb-hw-02
colorama colorama-librairy docker docker-image dockerfile goit goit-pyweb-hw-02 pip pip3 poetry poetry-python python-virtual-environment studying
Last synced: about 1 month ago
JSON representation
Модуль 2. Python Development
- Host: GitHub
- URL: https://github.com/lexhouk/goit-pyweb-hw-02
- Owner: lexhouk
- Created: 2024-06-14T08:59:54.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-06-15T12:19:29.000Z (6 months ago)
- Last Synced: 2024-06-15T14:38:17.997Z (6 months ago)
- Topics: colorama, colorama-librairy, docker, docker-image, dockerfile, goit, goit-pyweb-hw-02, pip, pip3, poetry, poetry-python, python-virtual-environment, studying
- Language: Python
- Homepage: https://www.edu.goit.global/uk/learn/21196455/24556365/24556501/homework
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Assistant bot
## Pre-installation
```bash
$ pip[3] install poetry
$ poetry config virtualenvs.in-project true
```## Installation
```bash
$ git clone https://github.com/lexhouk/goit-pyweb-hw-02.git goit-pyweb-hw-02
$ cd goit-pyweb-hw-02
$ poetry shell
$ poetry install
```## Usage
```bash
$ python main.py
```or with debug:
```bash
$ python main.py --debug
```## Classes diagram
```mermaid
classDiagram
Field <|--* Name
Field <|--* Phone
Field <|--* BirthdayName <|--* Record
Phone "0..*" <|--o "1" Record
Birthday <|--o RecordUserDict <|-- AddressBook
Record "0..*" <|--o "1" AddressBookException <|-- PhoneError
Exception <|-- BirthdayError
Exception <|-- RecordErrorABC <|-- Reader
Reader <|-- CliReaderABC <|-- Writer
Writer <|-- CliWriterclass Field {
<>
+str value
+__init__(str value) None
+__str__() str
}Phone: +__init__(str value) None
class Birthday {
+str FORMAT
+__init__(str value) None
+__str__() str
}class Record {
+Name name
+list~Phone~ phones
+Birthday|None birthday
+__init__(str name) None
+__str__() str
#find(str phone, bool get_instance) int | Phone | None
+add_phone(str phone) None
+remove_phone(str phone) None
+edit_phone(str current, str new) None
+find_phone(str phone) Phone | None
+add_birthday(str birthday) None
}class UserDict {
<>
}class AddressBook {
+data: Dict[str, Record]
+add_record(Record record) None
+find(str name) Record
+delete(str name) None
date_to_string(datetime.datetime date) str$
find_next_weekday(datetime.datetime start_date, int weekday) datetime.datetime$
+adjust_for_weekend(datetime.datetime birthday) datetime.datetime
+get_upcoming_birthdays(int days) Dict[str, list[str]]
}class Exception {
<>
}PhoneError: +__init__() None
BirthdayError: +__init__() Noneclass RecordError {
+str MESSAGE
+__init__() None
}class ABC {
<>
}class Reader {
<>
-prompt
+__init__(str prompt) None
read() tuple~str~*
}CliReader: +read() tuple~str~
class Writer {
<>
write(str data) None*
}class CliWriter {
+__init__() None
+write(str data) None
}
```