Skip to main content

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


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)

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.11-py3-none-any.whl (28.9 kB view details)

Uploaded Python 3

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

Hashes for jit_utils_backend-0.0.11.tar.gz
Algorithm Hash digest
SHA256 b000df97d20bf23190bd83d187360370732c4edd8ff942ddcac3af0876d8471b
MD5 bfd7e96cd66e6fb4b2f2a183edb0e4ae
BLAKE2b-256 df5ed700f327a805c19ba6d882f1becd7c311feb1d6f4165ce0d0794f9b2b272

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jit_utils_backend-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 25e437f8b74988369c9520dc57a6d565c4b467b4f6e0d565afb75ce117e6f6d6
MD5 63ced7087452f5d3ea5a932b96ac28b1
BLAKE2b-256 a40bcb13d4298e6d8cfc48d6cbd5bb8a7f82fb3076fa4c8689d391d2b278c627

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