JIT Utils Backend
Project description
JIT Utils Backend
Jit Backend Toolkit - A Python package that provides convenient utilities for backend development.
Installation
pip install jit_utils_backend
Usage
Importing the Package
# Import the entire package
import jit_utils
# Import specific functions (from specific submodules)
from jit_utils.time import now
from jit_utils.string import randomString
from jit_utils.qrcode import Qrcode
from jit_utils.barcode import Barcode
# Import specific modules
import jit_utils.time
import jit_utils.string
Key Features
1. Time Utilities
from jit_utils.time import now, today, dayShift, formatNow
# Get current time
current_time = now()
# Get today's date
today_date = today()
# Date offset
tomorrow = dayShift(today_date, 1)
# Format current time
formatted_time = formatNow("%Y-%m-%d %H:%M:%S")
2. String Utilities
from jit_utils.string import randomString, md5Str, getUuidStr
# Generate random string
random_str = randomString(8)
# MD5 encryption
encrypted = md5Str("hello world")
# Generate UUID
uuid_str = getUuidStr()
3. QR Code Generation
from jit_utils.qrcode import Qrcode
# Create QR code
qr = Qrcode("https://example.com")
# Get QR code image as bytes
qr_bytes = qr.toByte()
# Get QR code as base64 string
qr_str = qr.toStr()
4. Barcode Generation
from jit_utils.barcode import Barcode
# Create barcode
barcode = Barcode("123456789")
# Get barcode image as bytes
barcode_bytes = barcode.toByte()
# Get barcode as base64 string
barcode_str = barcode.toStr()
5. Data Validation
from jit_utils.validator import ParamsValidator
from dataclasses import dataclass
@dataclass
class UserParams(ParamsValidator):
name: str
age: int
email: str = ""
# Validate parameters
params = UserParams("test_function", name="John", age=25)
6. Decorators
from jit_utils.decorator import forward
@forward("module.submodule")
def my_function():
pass
Module Overview
- time_utils: Time handling utilities
- string_utils: String processing utilities
- qrcode: QR code generation tools
- barcode: Barcode generation tools
- validator: Data validation tools
- network: Network-related utilities
- signature: Signature-related utilities
- matchTool: Matching utilities
- clsTool: Class utilities
- exceptions: Exception handling
- workday_constants: Workday constants
- config: Configuration utilities
Dependencies
- requests
- qrcode
- python-barcode
- Pillow
- arrow
- python-dateutil
License
MIT License
Author
JitAi (develop@wanyunapp.com)
Version
0.0.11
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
jit_utils_backend-0.0.11.tar.gz
(23.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jit_utils_backend-0.0.11.tar.gz.
File metadata
- Download URL: jit_utils_backend-0.0.11.tar.gz
- Upload date:
- Size: 23.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b000df97d20bf23190bd83d187360370732c4edd8ff942ddcac3af0876d8471b
|
|
| MD5 |
bfd7e96cd66e6fb4b2f2a183edb0e4ae
|
|
| BLAKE2b-256 |
df5ed700f327a805c19ba6d882f1becd7c311feb1d6f4165ce0d0794f9b2b272
|
File details
Details for the file jit_utils_backend-0.0.11-py3-none-any.whl.
File metadata
- Download URL: jit_utils_backend-0.0.11-py3-none-any.whl
- Upload date:
- Size: 28.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25e437f8b74988369c9520dc57a6d565c4b467b4f6e0d565afb75ce117e6f6d6
|
|
| MD5 |
63ced7087452f5d3ea5a932b96ac28b1
|
|
| BLAKE2b-256 |
a40bcb13d4298e6d8cfc48d6cbd5bb8a7f82fb3076fa4c8689d391d2b278c627
|