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 (support@jit.pro)
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.12.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.12.tar.gz.
File metadata
- Download URL: jit_utils_backend-0.0.12.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 |
947f0eb6de0fa00fed073986077b6a08a782fa509c8c08243b9d166f663cb8ed
|
|
| MD5 |
7d2f18f6e39f68a7fea7db5d57dbaf0a
|
|
| BLAKE2b-256 |
39ccf4d370f2fc1018a273e97df72c74188d4f04ed74ca55d888e7083bce8d9b
|
File details
Details for the file jit_utils_backend-0.0.12-py3-none-any.whl.
File metadata
- Download URL: jit_utils_backend-0.0.12-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 |
6961ee13bf661ede2ab659a3cb835a4066c60ec2dd1686e0d98ed39365edb243
|
|
| MD5 |
5a252283f9460206a7d025774bf33dde
|
|
| BLAKE2b-256 |
1cc3098c2c7fbdc2be581db73ac011e21efb7799153c5fefec5a32670cf855ee
|