Skip to main content

极态后端工具包

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.9

Project details


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.10.tar.gz (23.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jit_utils_backend-0.0.10-py3-none-any.whl (28.9 kB view details)

Uploaded Python 3

File details

Details for the file jit_utils_backend-0.0.10.tar.gz.

File metadata

  • Download URL: jit_utils_backend-0.0.10.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

Hashes for jit_utils_backend-0.0.10.tar.gz
Algorithm Hash digest
SHA256 fbf8972c3aad1a7be0d9ddbe47ca2be4fe067baa4914d15d6074811a4ec0f2ca
MD5 5505f3a88ab9599e5b0c5765f318a530
BLAKE2b-256 54ca6479decb82625c34082b8138ac6e71bf688bf2115979eba722bc8220a226

See more details on using hashes here.

File details

Details for the file jit_utils_backend-0.0.10-py3-none-any.whl.

File metadata

File hashes

Hashes for jit_utils_backend-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 732c12858638645138fdf1f1316b9b7cab21487522e3c709379451aeb46b700f
MD5 216224bbb5aab76ac1c8a5051e2ae773
BLAKE2b-256 583185c40a155063ec0702fbf7af04dd3bb25a667a41cdb3953a9b7ec6870506

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page