Skip to main content

A general day-to-day toolset for PKScreener repos

Project description

PKDevTools

MADE-IN-INDIA GitHub release (latest by date) GitHub all releases GitHub CodeFactor BADGE

github license Downloads latest download PyPI is wheel Coverage Status codecov

Documentation PKDevTools Test - New Features 1. PKDevTools Build - New Release


Table of Contents


What is PKDevTools?

PKDevTools is a comprehensive Python toolkit designed for building high-performance financial applications. It provides:

  • ๐Ÿš€ Unified Data Provider - Multi-source stock data with automatic failover
  • ๐Ÿ“ Thread-Safe Logging - Process-safe logging with filtering and caller info
  • ๐Ÿ—„๏ธ Database Management - SQLite + Turso (libsql) with sync capabilities
  • โšก Multiprocessing - Cross-platform multiprocessing with shared state
  • ๐Ÿ“ฑ Telegram Integration - Send messages, documents, and media
  • ๐Ÿ”„ GitHub Automation - Workflow triggers, commits, and API integration
  • ๐Ÿ“ก Event System - Pub/Sub pattern for decoupled components
  • ๐Ÿ› ๏ธ Utilities - Caching, archiving, HTTP fetching, and more

This toolkit serves as the foundation for PKScreener, PKBrokers, and PKNSETools.


Installation

From PyPI (Recommended)

pip install PKDevTools

From Source

git clone https://github.com/pkjmesra/PKDevTools.git
cd PKDevTools
pip install -r requirements.txt
pip install -e .

Requirements

  • Python 3.9+
  • See requirements.txt for full dependency list

Quick Start

from PKDevTools.classes import get_data_provider, get_scalable_fetcher
from PKDevTools.classes.log import default_logger, setup_custom_logger

# Initialize logging (set environment variable first)
import os
os.environ["PKDevTools_Default_Log_Level"] = "10"  # DEBUG level

# Get stock data
provider = get_data_provider()
df = provider.get_stock_data("RELIANCE", interval="day", count=100)

# Use the logger
logger = default_logger()
logger.info("Data fetched successfully!")

Architecture Overview

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                           PKDevTools Architecture                        โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚                                                                          โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”       โ”‚
โ”‚  โ”‚  PKDataProvider  โ”‚  โ”‚ PKScalableData   โ”‚  โ”‚  DBManager       โ”‚       โ”‚
โ”‚  โ”‚  (Stock Data)    โ”‚  โ”‚ Fetcher (GitHub) โ”‚  โ”‚  (Turso/SQLite)  โ”‚       โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜       โ”‚
โ”‚           โ”‚                     โ”‚                     โ”‚                  โ”‚
โ”‚           โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                  โ”‚
โ”‚                                 โ”‚                                        โ”‚
โ”‚                    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                           โ”‚
โ”‚                    โ”‚     Core Services       โ”‚                           โ”‚
โ”‚                    โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค                           โ”‚
โ”‚                    โ”‚ โ€ข Logging (filterlogger)โ”‚                           โ”‚
โ”‚                    โ”‚ โ€ข Environment Config    โ”‚                           โ”‚
โ”‚                    โ”‚ โ€ข HTTP Fetcher          โ”‚                           โ”‚
โ”‚                    โ”‚ โ€ข Archiver (Caching)    โ”‚                           โ”‚
โ”‚                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                           โ”‚
โ”‚                                 โ”‚                                        โ”‚
โ”‚           โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                  โ”‚
โ”‚           โ”‚                     โ”‚                     โ”‚                  โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”        โ”‚
โ”‚  โ”‚   Telegram       โ”‚  โ”‚  GitHub        โ”‚  โ”‚  Pub/Sub Events  โ”‚        โ”‚
โ”‚  โ”‚   Integration    โ”‚  โ”‚  Integration   โ”‚  โ”‚  (blinker)       โ”‚        โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜        โ”‚
โ”‚                                                                          โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”       โ”‚
โ”‚  โ”‚                    Multiprocessing Layer                      โ”‚       โ”‚
โ”‚  โ”‚  PKMultiProcessorClient | PKJoinableQueue | Process Logging   โ”‚       โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜       โ”‚
โ”‚                                                                          โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Core Modules

1. Data Provider System

The unified data provider fetches stock OHLCV data from multiple sources with automatic failover.

PKDataProvider

from PKDevTools.classes.PKDataProvider import PKDataProvider, get_data_provider

# Get singleton instance
provider = get_data_provider()

# Fetch stock data with automatic source selection
# Priority: Real-time (PKBrokers) โ†’ Local Pickle โ†’ Remote GitHub Pickle
df = provider.get_stock_data("RELIANCE", interval="5m", count=50)

# Fetch multiple stocks
data = provider.get_multiple_stocks(["RELIANCE", "TCS", "INFY"], interval="day")

# Check real-time availability
if provider.is_realtime_available():
    price = provider.get_latest_price("INFY")
    ohlcv = provider.get_realtime_ohlcv("INFY")

Supported Intervals:

Interval Description
1m, 2m, 3m, 4m, 5m Minute candles
10m, 15m, 30m, 60m Extended minute candles
day Daily candles

PKScalableDataFetcher

GitHub-based data fetcher without Telegram dependency:

from PKDevTools.classes.PKScalableDataFetcher import PKScalableDataFetcher, get_scalable_fetcher

fetcher = get_scalable_fetcher()

# Fetch from GitHub raw content
data = fetcher.fetch_stock_data("RELIANCE")

2. Logging Framework

Thread and process-safe logging with automatic caller information injection.

Setup and Usage

import os
from PKDevTools.classes.log import (
    setup_custom_logger,
    default_logger,
    log_to,
    tracelog
)

# Enable logging via environment variable
os.environ["PKDevTools_Default_Log_Level"] = "10"  # DEBUG=10, INFO=20, WARNING=30, ERROR=40

# Setup custom logger
logger = setup_custom_logger(
    name="MyApp",
    levelname=10,  # DEBUG
    log_file_path="/path/to/logs.txt",
    filter="IMPORTANT"  # Only log messages containing "IMPORTANT"
)

# Use default logger
logger = default_logger()
logger.debug("Debug message")
logger.info("Info message")
logger.warning("Warning message")
logger.error("Error message")  # Automatically includes traceback
logger.critical("Critical message")

Decorator for Function Tracing

from PKDevTools.classes.log import log_to, default_logger

@log_to(default_logger().info)
def my_function(param1, param2):
    """Function calls are automatically logged with arguments and timing"""
    return param1 + param2

Log Levels

Level Value Description
DEBUG 10 Detailed diagnostic information
INFO 20 General operational messages
WARNING 30 Warning messages
ERROR 40 Error messages with traceback
CRITICAL 50 Critical failures

Key Classes

  • filterlogger: Thread/process-safe logger with filtering
  • emptylogger: No-op logger when logging is disabled
  • colors: ANSI color codes for terminal formatting

3. Database Management

Dual database support with SQLite (local) and Turso/libsql (cloud).

DBManager

from PKDevTools.classes.DBManager import DBManager, PKUser

# Initialize manager (uses environment variables for Turso connection)
db = DBManager()

# User operations
user = db.getUserByID(12345)
otp, subscription_model, validity, user = db.getOTP(
    userID=12345,
    userName="john_doe",
    fullName="John Doe"
)

# Scanner job subscriptions
db.subscribeScannerForUser(userID=12345, scannerIDs="X:12:9,X:12:31")
subscriptions = db.getSubscribedScannersByUser(userID=12345)

DatabaseSyncChecker

from PKDevTools.classes.DatabaseSyncChecker import DatabaseSyncChecker

checker = DatabaseSyncChecker(
    local_db_path="./local.db",
    turso_url="libsql://your-db.turso.io",
    turso_auth_token="your-token"
)

needs_sync, messages = checker.check_sync_status()
checker.print_counts()

Key Models

  • PKUser: User model with subscription management
  • PKScannerJob: Scanner job subscription model
  • PKUserModel: Enum for database column mapping

4. Environment & Configuration

Centralized environment variable and secrets management.

PKEnvironment

from PKDevTools.classes.Environment import PKEnvironment

# Singleton instance - loads from .env.dev file
env = PKEnvironment()

# Access secrets as attributes
github_token = env.GITHUB_TOKEN
chat_id = env.CHAT_ID
telegram_token = env.TOKEN

# Access all secrets
all_secrets = env.allSecrets  # Returns dict

Required Environment Variables

Variable Description
GITHUB_TOKEN GitHub API token for repository operations
CHAT_ID Telegram channel/chat ID
TOKEN Telegram bot token
chat_idADMIN Admin chat ID for notifications
PKDevTools_Default_Log_Level Logging level (10=DEBUG, 20=INFO, etc.)

5. Multiprocessing

Cross-platform multiprocessing with shared state and logging support.

PKMultiProcessorClient

from PKDevTools.classes.PKMultiProcessorClient import PKMultiProcessorClient
from PKDevTools.classes.PKJoinableQueue import PKJoinableQueue
from multiprocessing import Manager

# Create shared resources
manager = Manager()
task_queue = PKJoinableQueue()
result_queue = PKJoinableQueue()

# Define processor method
def process_task(stock_code, data_dict, result_dict):
    # Process stock data
    result = analyze_stock(stock_code)
    return result

# Create worker processes
workers = []
for i in range(4):  # 4 worker processes
    worker = PKMultiProcessorClient(
        processorMethod=process_task,
        task_queue=task_queue,
        result_queue=result_queue,
        objectDictionaryPrimary=manager.dict(),
        keyboardInterruptEvent=manager.Event()
    )
    worker.start()
    workers.append(worker)

# Add tasks
for stock in ["RELIANCE", "TCS", "INFY"]:
    task_queue.put(stock)

# Signal completion and wait
task_queue.join()

PKJoinableQueue

Enhanced multiprocessing queue with join support:

from PKDevTools.classes.PKJoinableQueue import PKJoinableQueue

queue = PKJoinableQueue()
queue.put("task1")
queue.put("task2")

# Worker processes call task_done() after processing
queue.join()  # Blocks until all tasks completed

6. Telegram Integration

Send messages, documents, and media to Telegram.

Basic Usage

from PKDevTools.classes.Telegram import (
    send_message,
    send_document,
    send_photo,
    send_media_group
)

# Send text message
send_message(
    message="Hello from PKDevTools!",
    userID="-1001234567890",
    parse_type="HTML"
)

# Send document
send_document(
    file_path="/path/to/file.pdf",
    message="Here's your report",
    userID="-1001234567890"
)

# Send photo
send_photo(
    photo_path="/path/to/image.png",
    caption="Analysis results",
    userID="-1001234567890"
)

# Send multiple documents as media group
send_media_group(
    file_paths=["/path/to/file1.pdf", "/path/to/file2.pdf"],
    message="Multiple reports",
    userID="-1001234567890"
)

Message Formatting

Messages support HTML formatting:

send_message(
    message="<b>Bold</b> <i>Italic</i> <code>Code</code>",
    userID=chat_id,
    parse_type="HTML"
)

7. GitHub Integration

Automate GitHub operations including commits, workflow triggers, and API calls.

Committer

from PKDevTools.classes.Committer import Committer

# Copy files
Committer.copySourceToDestination(
    srcPath="results/*.pkl",
    destPath="backup/"
)

# Commit and push changes
Committer.commitTempOutcomes(
    addPath="results/*",
    commitMessage="[Auto] Updated results",
    branchName="main"
)

# Execute OS command with logging
Committer.execOSCommand("git status", showStatus=True)

WorkflowManager

from PKDevTools.classes.WorkflowManager import WorkflowManager

# Trigger GitHub Actions workflow
WorkflowManager.trigger_workflow(
    repo="pkjmesra/PKScreener",
    workflow_id="scan.yml",
    ref="main",
    inputs={"scan_type": "full"}
)

githubutilities

from PKDevTools.classes.githubutilities import (
    getWorkflowRunByName,
    stopWorkflow,
    getLatestRelease
)

# Get latest release
release = getLatestRelease("pkjmesra/PKScreener")

# Get workflow run
run = getWorkflowRunByName("pkjmesra/PKScreener", "Build")

8. Pub/Sub Event System

Decoupled event publishing and subscription using blinker.

Publishing Events

from PKDevTools.classes.pubsub.publisher import PKUserService
from PKDevTools.classes.pubsub.events import globalEventsSignal

# Using PKUserService
service = PKUserService()
service.notify_user(scannerID="X:12:9", notification="Scan complete!")

# Direct signal publishing
globalEventsSignal.send(
    sender=self,
    eventType="custom",
    data={"key": "value"}
)

Subscribing to Events

from PKDevTools.classes.pubsub.events import globalEventsSignal

def my_handler(sender, **kwargs):
    scanner_id = kwargs.get('scannerID')
    notification = kwargs.get('notification')
    print(f"Received: {scanner_id} - {notification}")

# Subscribe to events
globalEventsSignal.connect(my_handler)

9. Utilities

Archiver (Caching & File Management)

from PKDevTools.classes import Archiver

# Get user data directory
data_dir = Archiver.get_user_data_dir()

# Get user outputs directory
outputs_dir = Archiver.get_user_outputs_dir()

# Cache binary data
Archiver.cacheFile(binary_data, "cache_file.bin")

# Find cached file
data, path, modified_time = Archiver.findFile("cache_file.bin")

# Get last modified datetime
modified = Archiver.get_last_modified_datetime("/path/to/file")

Fetcher (HTTP Requests)

from PKDevTools.classes.Fetcher import fetcher

f = fetcher()

# Fetch URL with caching
response = f.fetchURL("https://api.example.com/data")

# Fetch with custom headers
response = f.fetchURL(
    url="https://api.example.com/data",
    headers={"Authorization": "Bearer token"}
)

PKDateUtilities

from PKDevTools.classes.PKDateUtilities import PKDateUtilities

# Check if market is open
is_open = PKDateUtilities.isTradingTime()

# Check if today is a holiday
is_holiday = PKDateUtilities.isTradingHoliday()

# Get current IST time
ist_now = PKDateUtilities.currentDateTime()

# Get trading day offset
trading_date = PKDateUtilities.tradingDate()

PKTimer

from PKDevTools.classes.PKTimer import PKTimer

# Measure execution time
with PKTimer("Operation name"):
    # Code to measure
    perform_operation()

ColorText

from PKDevTools.classes.ColorText import colorText

# Print colored text
print(colorText.GREEN + "Success!" + colorText.END)
print(colorText.FAIL + "Error!" + colorText.END)
print(colorText.WARN + "Warning!" + colorText.END)

FunctionTimeouts

from PKDevTools.classes.FunctionTimeouts import exit_after

@exit_after(5)  # Timeout after 5 seconds
def slow_function():
    # Long running operation
    pass

API Reference

Main Exports

from PKDevTools.classes import (
    # Data Providers
    PKDataProvider,
    get_data_provider,
    PKScalableDataFetcher,
    get_scalable_fetcher,
    
    # Version
    VERSION,
)

Module Structure

PKDevTools/
โ”œโ”€โ”€ classes/
โ”‚   โ”œโ”€โ”€ __init__.py              # Main exports
โ”‚   โ”œโ”€โ”€ PKDataProvider.py        # Unified data provider
โ”‚   โ”œโ”€โ”€ PKScalableDataFetcher.py # GitHub-based fetcher
โ”‚   โ”œโ”€โ”€ log.py                   # Logging framework
โ”‚   โ”œโ”€โ”€ DBManager.py             # Database management
โ”‚   โ”œโ”€โ”€ Environment.py           # Environment/secrets
โ”‚   โ”œโ”€โ”€ Fetcher.py               # HTTP client
โ”‚   โ”œโ”€โ”€ Telegram.py              # Telegram integration
โ”‚   โ”œโ”€โ”€ Committer.py             # Git operations
โ”‚   โ”œโ”€โ”€ WorkflowManager.py       # GitHub Actions
โ”‚   โ”œโ”€โ”€ PKMultiProcessorClient.py # Multiprocessing
โ”‚   โ”œโ”€โ”€ PKJoinableQueue.py       # Enhanced queue
โ”‚   โ”œโ”€โ”€ Archiver.py              # Caching/files
โ”‚   โ”œโ”€โ”€ PKDateUtilities.py       # Date/time utilities
โ”‚   โ”œโ”€โ”€ pubsub/                  # Event system
โ”‚   โ”‚   โ”œโ”€โ”€ events.py            # Signal definitions
โ”‚   โ”‚   โ”œโ”€โ”€ publisher.py         # Event publishing
โ”‚   โ”‚   โ””โ”€โ”€ subscriber.py        # Event handling
โ”‚   โ””โ”€โ”€ ...                      # Other utilities
โ””โ”€โ”€ release.md                   # Release notes

Environment Variables

Variable Required Description
PKDevTools_Default_Log_Level No Logging level (10=DEBUG, 20=INFO, 30=WARNING, 40=ERROR)
GITHUB_TOKEN Yes* GitHub API token
TOKEN Yes* Telegram bot token
CHAT_ID Yes* Default Telegram chat ID
chat_idADMIN No Admin notification chat ID
TURSO_DB_URL No Turso database URL
TURSO_DB_AUTH_TOKEN No Turso authentication token

*Required for respective functionality


Contributing

We welcome contributions! Please follow these guidelines:

Development Setup

  1. Fork the repository
  2. Clone your fork:
    git clone https://github.com/YOUR_USERNAME/PKDevTools.git
    cd PKDevTools
    
  3. Create a virtual environment:
    python -m venv venv
    source venv/bin/activate  # or `venv\Scripts\activate` on Windows
    
  4. Install development dependencies:
    pip install -r requirements.txt
    pip install -e .
    

Running Tests

# Run all tests
pytest test/

# Run with coverage
pytest --cov=PKDevTools test/

# Run specific test file
pytest test/DBManager_test.py

Code Style

We use ruff for linting:

ruff check PKDevTools/
ruff format PKDevTools/

Pull Request Guidelines

  1. Create a feature branch from main
  2. Write tests for new functionality
  3. Ensure all tests pass
  4. Update documentation as needed
  5. Submit a pull request with a clear description

See CONTRIBUTING.md for detailed guidelines.


License

This project is licensed under the MIT License - see the LICENSE file for details.


Related Projects


Support


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

pkdevtools-0.0.20251225.tar.gz (117.7 kB view details)

Uploaded Source

Built Distributions

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

pkdevtools-0.0.20251225-cp312-cp312-win_amd64.whl (164.2 kB view details)

Uploaded CPython 3.12Windows x86-64

pkdevtools-0.0.20251225-cp312-cp312-manylinux2014_x86_64.whl (162.8 kB view details)

Uploaded CPython 3.12

pkdevtools-0.0.20251225-cp310-cp310-macosx_13_0_arm64.whl (162.7 kB view details)

Uploaded CPython 3.10macOS 13.0+ ARM64

pkdevtools-0.0.20251225-cp310-cp310-macosx_10_9_x86_64.whl (162.7 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

File details

Details for the file pkdevtools-0.0.20251225.tar.gz.

File metadata

  • Download URL: pkdevtools-0.0.20251225.tar.gz
  • Upload date:
  • Size: 117.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for pkdevtools-0.0.20251225.tar.gz
Algorithm Hash digest
SHA256 12b54911f7d5f74a832404a441355449c1fc1b267bd0a3db410b046f3b20a456
MD5 33157cdb94a2e397c149bdd5ab6e5af3
BLAKE2b-256 1e1a79331d7cdeba6b9242a1cc3490e4eeb4937d4aa2de185481d557ec89fdc6

See more details on using hashes here.

File details

Details for the file pkdevtools-0.0.20251225-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for pkdevtools-0.0.20251225-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 898fb3b1e5b054ba85bcb39da11b4b667019cd472b86b7d7440332f1e04276d6
MD5 30b77b9c583da7220847422f302e0ad6
BLAKE2b-256 b2cbc14a43490ba2e2a5c51511d4fa4feea581744c51ba454a1b4b9c07d78e11

See more details on using hashes here.

File details

Details for the file pkdevtools-0.0.20251225-cp312-cp312-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pkdevtools-0.0.20251225-cp312-cp312-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4c85d04a7c95f32101fcc0177da09870180eab69a31619dff5233cbb54f9801c
MD5 e813289496d99c486c144d294990198e
BLAKE2b-256 3b4c4a6e561d2d55bd823fa99540b02a359281a146b3ae8f96577fdc5337e2ad

See more details on using hashes here.

File details

Details for the file pkdevtools-0.0.20251225-cp310-cp310-macosx_13_0_arm64.whl.

File metadata

File hashes

Hashes for pkdevtools-0.0.20251225-cp310-cp310-macosx_13_0_arm64.whl
Algorithm Hash digest
SHA256 bfe76751fa8175ddc6ef77169519c35ba24eab4d7067f264768ffb5e54f862d6
MD5 1c1d0f157040bfa6788e8aadf1a8ebcd
BLAKE2b-256 873b50acb2932591fd825303c917237eda32f3a87103ce83ecfe1ae4486a29e5

See more details on using hashes here.

File details

Details for the file pkdevtools-0.0.20251225-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for pkdevtools-0.0.20251225-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 112b0f274b73280715cd0dcdd56480009f9201fbd8a0a6473a3ce3a150ed8373
MD5 0c4ff8c558db6df5b27e4fd74f49dde6
BLAKE2b-256 6e1ce24aa457ff0608a0b1eb474a3a93f73a52ff71820ff5f531325a312563bc

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