this is common for base
Project description
#Common Package This is a common package for base, my web project base package.
-
Dto
- ResObj (this is Response Dto format:{"code":200, "message":"", data: None})
-
handler
- exception_handler (this is gobal exception handler)
-
Exception (this is custom exception)
- AuthException
- BusinessException
-
Utils
- date_util
- get_time_by_str(date_str, date_format=DATE_TIME_FORMAT)
- convert_date_str_format(date_str, old_format, new_format)
- get_date_str_by_time(date_format, timestamp)
- file_util
- read_files_in_folder(file_path)
- write_json_to_file(file_path, data, encoding='UTF-8')
- http_util
- get(url, params=None, headers=None)
- get_json(url, params=None, headers=None)
- post(url, params=None, headers=None, timeout=30)
- post_json(url, params=None, headers=None, timeout=30)
- festival_util
- get_holiday_date_by_year_name(year, festival_name)
- get_holiday_by_date(date_str)
- is_holiday(date_str)
- date_util
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
common-web-0.2.0.tar.gz
(5.2 kB
view details)
File details
Details for the file common-web-0.2.0.tar.gz
.
File metadata
- Download URL: common-web-0.2.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1eb3d4bd0bfb32750270214fb1efa516ebe9724794c37eeb6d9f609c293f6f2e |
|
MD5 | 85becc1385fa93ab61991a81877a0469 |
|
BLAKE2b-256 | a94aa2490c66ac7b2eacc6d48ff95cecbda8bb09c5b13cb184c5e2f8f8245e4e |