repo_full_name stringlengths 6 93 | repo_url stringlengths 25 112 | repo_api_url stringclasses 28
values | owner stringclasses 28
values | repo_name stringclasses 28
values | description stringclasses 28
values | stars int64 617 98.8k | forks int64 31 355 ⌀ | watchers int64 990 999 ⌀ | license stringclasses 2
values | default_branch stringclasses 2
values | repo_created_at timestamp[s]date 2012-07-24 23:12:50 2025-06-16 08:07:28 ⌀ | repo_updated_at timestamp[s]date 2026-02-23 15:23:15 2026-05-03 18:52:12 ⌀ | repo_topics listlengths 0 13 ⌀ | repo_languages unknown | is_fork bool 1
class | open_issues int64 3 104 ⌀ | file_path stringlengths 3 208 | file_name stringclasses 509
values | file_extension stringclasses 1
value | file_size_bytes int64 101 84k ⌀ | file_url stringclasses 627
values | file_raw_url stringclasses 627
values | file_sha stringclasses 624
values | language stringclasses 8
values | parsed_at stringdate 2026-05-04 01:12:36 2026-05-04 19:41:55 | text stringlengths 100 102k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
GongRzhe/Office-Word-MCP-Server | https://github.com/GongRzhe/Office-Word-MCP-Server | null | null | null | null | 1,916 | null | null | mit | null | null | null | null | null | null | null | word_document_server/core/styles.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:49.606309 | """
Style-related functions for Word Document Server.
"""
from docx.shared import Pt
from docx.enum.style import WD_STYLE_TYPE
def ensure_heading_style(doc):
"""
Ensure Heading styles exist in the document.
Args:
doc: Document object
"""
for i in range(1, 10): # Create Heading 1 thro... |
GongRzhe/Office-Word-MCP-Server | https://github.com/GongRzhe/Office-Word-MCP-Server | null | null | null | null | 1,916 | null | null | mit | null | null | null | null | null | null | null | word_document_server/core/unprotect.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:49.645913 | """
Unprotect document functionality for the Word Document Server.
This module handles removing document protection.
"""
import os
import json
import hashlib
import tempfile
import shutil
from typing import Tuple, Optional
def remove_protection_info(filename: str, password: Optional[str] = None) -> Tuple[bool, str]:
... |
GongRzhe/Office-Word-MCP-Server | https://github.com/GongRzhe/Office-Word-MCP-Server | null | null | null | null | 1,916 | null | null | mit | null | null | null | null | null | null | null | word_document_server/main.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:49.676343 | """
Main entry point for the Word Document MCP Server.
Acts as the central controller for the MCP server that handles Word document operations.
Supports multiple transports: stdio, sse, and streamable-http using standalone FastMCP.
"""
import os
import sys
from dotenv import load_dotenv
# Load environment variables f... |
GongRzhe/Office-Word-MCP-Server | https://github.com/GongRzhe/Office-Word-MCP-Server | null | null | null | null | 1,916 | null | null | mit | null | null | null | null | null | null | null | word_document_server/core/tables.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:49.685163 | """
Table-related operations for Word Document Server.
"""
from docx.oxml.shared import OxmlElement, qn
from docx.oxml.ns import nsdecls
from docx.oxml import parse_xml
from docx.shared import RGBColor, Inches, Cm, Pt
from docx.enum.text import WD_ALIGN_PARAGRAPH
from docx.enum.table import WD_CELL_VERTICAL_ALIGNMENT
... |
GongRzhe/Office-Word-MCP-Server | https://github.com/GongRzhe/Office-Word-MCP-Server | null | null | null | null | 1,916 | null | null | mit | null | null | null | null | null | null | null | word_document_server/tools/document_tools.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:49.712471 | """
Document creation and manipulation tools for Word Document Server.
"""
import os
import json
from typing import Dict, List, Optional, Any
from docx import Document
from word_document_server.utils.file_utils import check_file_writeable, ensure_docx_extension, create_document_copy
from word_document_server.utils.doc... |
GongRzhe/Office-Word-MCP-Server | https://github.com/GongRzhe/Office-Word-MCP-Server | null | null | null | null | 1,916 | null | null | mit | null | null | null | null | null | null | null | word_document_server/tools/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:49.713026 | """
MCP tool implementations for the Word Document Server.
This package contains the MCP tool implementations that expose functionality
to clients through the Model Context Protocol.
"""
# Document tools
from word_document_server.tools.document_tools import (
create_document, get_document_info, get_document_text,... |
GongRzhe/Office-Word-MCP-Server | https://github.com/GongRzhe/Office-Word-MCP-Server | null | null | null | null | 1,916 | null | null | mit | null | null | null | null | null | null | null | word_document_server/tools/content_tools.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:49.731318 | """
Content tools for Word Document Server.
These tools add various types of content to Word documents,
including headings, paragraphs, tables, images, and page breaks.
"""
import os
from typing import List, Optional, Dict, Any
from docx import Document
from docx.shared import Inches, Pt, RGBColor
from word_document_... |
GongRzhe/Office-Word-MCP-Server | https://github.com/GongRzhe/Office-Word-MCP-Server | null | null | null | null | 1,916 | null | null | mit | null | null | null | null | null | null | null | word_document_server/tools/footnote_tools.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:49.750648 | """
Footnote and endnote tools for Word Document Server.
These tools handle footnote and endnote functionality,
including adding, customizing, and converting between them.
This module combines both standard and robust implementations:
- String-return functions for backward compatibility
- Dict-return robust functions... |
GongRzhe/Office-Word-MCP-Server | https://github.com/GongRzhe/Office-Word-MCP-Server | null | null | null | null | 1,916 | null | null | mit | null | null | null | null | null | null | null | word_document_server/tools/comment_tools.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:49.757616 | """
Comment extraction tools for Word Document Server.
These tools provide high-level interfaces for extracting and analyzing
comments from Word documents through the MCP protocol.
"""
import os
import json
from typing import Dict, List, Optional, Any
from docx import Document
from word_document_server.utils.file_uti... |
GongRzhe/Office-Word-MCP-Server | https://github.com/GongRzhe/Office-Word-MCP-Server | null | null | null | null | 1,916 | null | null | mit | null | null | null | null | null | null | null | word_document_server/tools/extended_document_tools.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:49.758307 | """
Extended document tools for Word Document Server.
These tools provide enhanced document content extraction and search capabilities.
"""
import os
import json
import subprocess
import platform
import shutil
from typing import Dict, List, Optional, Any, Union, Tuple
from docx import Document
from word_document_serv... |
GongRzhe/Office-Word-MCP-Server | https://github.com/GongRzhe/Office-Word-MCP-Server | null | null | null | null | 1,916 | null | null | mit | null | null | null | null | null | null | null | word_document_server/tools/protection_tools.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:50.254858 | """
Protection tools for Word Document Server.
These tools handle document protection features such as
password protection, restricted editing, and digital signatures.
"""
import os
import hashlib
import datetime
import io
from typing import List, Optional, Dict, Any
from docx import Document
import msoffcrypto
fro... |
GongRzhe/Office-Word-MCP-Server | https://github.com/GongRzhe/Office-Word-MCP-Server | null | null | null | null | 1,916 | null | null | mit | null | null | null | null | null | null | null | word_document_server/utils/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:50.260339 | """
Utility functions for the Word Document Server.
This package contains utility modules for file operations and document handling.
"""
from word_document_server.utils.file_utils import check_file_writeable, create_document_copy, ensure_docx_extension
from word_document_server.utils.document_utils import get_documen... |
GongRzhe/Office-Word-MCP-Server | https://github.com/GongRzhe/Office-Word-MCP-Server | null | null | null | null | 1,916 | null | null | mit | null | null | null | null | null | null | null | word_document_server/utils/document_utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:50.261986 | """
Document utility functions for Word Document Server.
"""
import json
from typing import Dict, List, Any
from docx import Document
from docx.oxml.table import CT_Tbl
from docx.oxml.text.paragraph import CT_P
from docx.oxml.ns import qn
from docx.oxml import OxmlElement
def get_document_properties(doc_path: str) ->... |
GongRzhe/Office-Word-MCP-Server | https://github.com/GongRzhe/Office-Word-MCP-Server | null | null | null | null | 1,916 | null | null | mit | null | null | null | null | null | null | null | word_document_server/utils/file_utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:50.316616 | """
File utility functions for Word Document Server.
"""
import os
from typing import Tuple, Optional
import shutil
def check_file_writeable(filepath: str) -> Tuple[bool, str]:
"""
Check if a file can be written to.
Args:
filepath: Path to the file
Returns:
Tuple of (is_w... |
GongRzhe/Office-Word-MCP-Server | https://github.com/GongRzhe/Office-Word-MCP-Server | null | null | null | null | 1,916 | null | null | mit | null | null | null | null | null | null | null | word_document_server/tools/format_tools.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:50.317336 | """
Formatting tools for Word Document Server.
These tools handle formatting operations for Word documents,
including text formatting, table formatting, and custom styles.
"""
import os
from typing import List, Optional, Dict, Any
from docx import Document
from docx.shared import Pt, RGBColor
from docx.enum.text impor... |
GongRzhe/Office-Word-MCP-Server | https://github.com/GongRzhe/Office-Word-MCP-Server | null | null | null | null | 1,916 | null | null | mit | null | null | null | null | null | null | null | word_document_server/utils/extended_document_utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:50.359172 | """
Extended document utilities for Word Document Server.
"""
from typing import Dict, List, Any, Tuple
from docx import Document
def get_paragraph_text(doc_path: str, paragraph_index: int) -> Dict[str, Any]:
"""
Get text from a specific paragraph in a Word document.
Args:
doc_path: Path to t... |
GongRzhe/Office-Word-MCP-Server | https://github.com/GongRzhe/Office-Word-MCP-Server | null | null | null | null | 1,916 | null | null | mit | null | null | null | null | null | null | null | word_mcp_server.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:50.431118 | #!/usr/bin/env python3
"""
Run script for the Word Document Server.
This script provides a simple way to start the Word Document Server.
"""
from word_document_server.main import run_server
if __name__ == "__main__":
run_server()
|
kimjammer/Neuro | https://github.com/kimjammer/Neuro | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | llmWrappers/imageLLMWrapper.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:52.688282 | import os
import mss, cv2, base64
import numpy as np
from transformers import AutoTokenizer
from constants import *
from llmWrappers.abstractLLMWrapper import AbstractLLMWrapper
class ImageLLMWrapper(AbstractLLMWrapper):
def __init__(self, signals, tts, llmState, modules=None):
super().__init__(signals, ... |
kimjammer/Neuro | https://github.com/kimjammer/Neuro | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | llmWrappers/textLLMWrapper.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:52.725546 | import os
from transformers import AutoTokenizer
from constants import *
from llmWrappers.abstractLLMWrapper import AbstractLLMWrapper
class TextLLMWrapper(AbstractLLMWrapper):
def __init__(self, signals, tts, llmState, modules=None):
super().__init__(signals, tts, llmState, modules)
self.SYSTEM... |
kimjammer/Neuro | https://github.com/kimjammer/Neuro | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | llmWrappers/abstractLLMWrapper.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:52.726678 | import copy
import requests
import sseclient
import json
import time
from dotenv import load_dotenv
from constants import *
from modules.injection import Injection
class AbstractLLMWrapper:
def __init__(self, signals, tts, llmState, modules=None):
self.signals = signals
self.llmState = llmState
... |
kimjammer/Neuro | https://github.com/kimjammer/Neuro | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | modules/customPrompt.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:52.731581 | from modules.module import Module
from modules.injection import Injection
class CustomPrompt(Module):
def __init__(self, signals, enabled=True):
super().__init__(signals, enabled)
self.API = self.API(self)
self.prompt_injection.text = ""
self.prompt_injection.priority = 200
... |
kimjammer/Neuro | https://github.com/kimjammer/Neuro | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | modules/audioPlayer.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:52.732549 | import os
from math import ceil
import asyncio
import queue
import pyaudio
from pydub import AudioSegment
from modules.module import Module
from constants import OUTPUT_DEVICE_INDEX
class AudioPlayer(Module):
def __init__(self, signals, enabled=True):
super().__init__(signals, enabled)
self.play_... |
kimjammer/Neuro | https://github.com/kimjammer/Neuro | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | llmWrappers/llmState.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:52.734073 | class LLMState:
def __init__(self):
self.enabled = True
self.next_cancelled = False
# Read in blacklist from file
with open('blacklist.txt', 'r') as file:
self.blacklist = file.read().splitlines() |
kimjammer/Neuro | https://github.com/kimjammer/Neuro | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | main.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:52.735292 | # Python Module Imports
import signal
import sys
import time
import threading
import asyncio
# Class Imports
from signals import Signals
from prompter import Prompter
from llmWrappers.llmState import LLMState
from llmWrappers.textLLMWrapper import TextLLMWrapper
from llmWrappers.imageLLMWrapper import ImageLLMWrapper
... |
kimjammer/Neuro | https://github.com/kimjammer/Neuro | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | constants.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:52.743509 | # This file holds various constants used in the program
# Variables marked with #UNIQUE# will be unique to your setup and NEED to be changed or the program will not work correctly.
# CORE SECTION: All constants in this section are necessary
# Microphone/Speaker device indices
# Use utils/listAudioDevices.py to find t... |
kimjammer/Neuro | https://github.com/kimjammer/Neuro | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | modules/discordClient.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:52.744259 | import os
from dotenv import load_dotenv
import discord
from modules.module import Module
from streamingSink import StreamingSink
class DiscordClient(Module):
def __init__(self, signals, stt, enabled=True):
super().__init__(signals, enabled)
self.stt = stt
async def run(self):
bot = ... |
kimjammer/Neuro | https://github.com/kimjammer/Neuro | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | modules/injection.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:52.772755 |
'''
Represents some text to be injected into the LLM prompt.
Injections are added to the prompt from lowest to highest priority, with the highest being at the end.
Text is the text to be injected.
Priority is a positive integer. Injections with negative priority will be ignored.
System Prompt Priority: 10
Message Hist... |
kimjammer/Neuro | https://github.com/kimjammer/Neuro | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | modules/memory.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:53.351060 | from modules.module import Module
from constants import *
from chromadb.config import Settings
import chromadb
import requests
import json
import uuid
import asyncio
import copy
class Memory(Module):
def __init__(self, signals, enabled=True):
super().__init__(signals, enabled)
self.API = self.AP... |
kimjammer/Neuro | https://github.com/kimjammer/Neuro | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | signals.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:53.363565 | import queue
class Signals:
def __init__(self):
self._human_speaking = False
self._AI_speaking = False
self._AI_thinking = False
self._last_message_time = 0.0
self._new_message = False
self._tts_ready = False
self._stt_ready = False
self._recentTwitc... |
kimjammer/Neuro | https://github.com/kimjammer/Neuro | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | prompter.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:53.365058 | import time
from constants import PATIENCE
class Prompter:
def __init__(self, signals, llms, modules=None):
self.signals = signals
self.llms = llms
if modules is None:
self.modules = {}
else:
self.modules = modules
self.system_ready = False
... |
kimjammer/Neuro | https://github.com/kimjammer/Neuro | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | modules/multimodal.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:53.372602 | from modules.module import Module
from constants import MULTIMODAL_STRATEGY
class MultiModal(Module):
def __init__(self, signals, enabled=True):
super().__init__(signals, enabled)
self.API = self.API(self)
self.enabled = enabled
def get_prompt_injection(self):
return self.pro... |
kimjammer/Neuro | https://github.com/kimjammer/Neuro | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | modules/module.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:53.373081 | import asyncio
from modules.injection import Injection
'''
An extendable class that defines a module that interacts with the main program.
All modules will be run in its own thread with its own event loop.
Do not use this class directly, extend it
'''
class Module:
def __init__(self, signals, enabled=True):
... |
kimjammer/Neuro | https://github.com/kimjammer/Neuro | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | modules/vtubeStudio.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:53.374276 | import asyncio
import queue
import pyvts
from modules.module import Module
from constants import VTUBE_MODEL_POSITIONS, VTUBE_MIC_POSITION
class VtubeStudio(Module):
def __init__(self, signals, enabled=True):
super().__init__(signals, enabled)
self.queue = queue.SimpleQueue()
self.API = se... |
kimjammer/Neuro | https://github.com/kimjammer/Neuro | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | modules/twitchClient.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:53.380428 | from twitchAPI.twitch import Twitch
from twitchAPI.oauth import UserAuthenticator
from twitchAPI.type import AuthScope, ChatEvent
from twitchAPI.chat import Chat, EventData, ChatMessage, ChatSub, ChatCommand
import os
import asyncio
from dotenv import load_dotenv
from constants import TWITCH_CHANNEL, TWITCH_MAX_MESSAGE... |
kimjammer/Neuro | https://github.com/kimjammer/Neuro | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | streamingSink.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:53.380971 | import io
from discord.sinks.core import Filters, Sink, default_filters, AudioData
class StreamingSink(Sink):
"""A custom sink that will convert the audio to
"""
def __init__(self, signals, stt, filters=None):
if filters is None:
filters = default_filters
self.filters = filt... |
kimjammer/Neuro | https://github.com/kimjammer/Neuro | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | stt.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:53.410679 | import logging
import time
from RealtimeSTT import AudioToTextRecorder
from constants import *
class STT:
def __init__(self, signals):
self.recorder = None
self.signals = signals
self.API = self.API(self)
self.enabled = True
def process_text(self, text):
if not self.en... |
kimjammer/Neuro | https://github.com/kimjammer/Neuro | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | socketioServer.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:53.411298 | import time
from aiohttp import web
import socketio
from aiohttp.web_runner import GracefulExit
from constants import PATIENCE
class SocketIOServer:
def __init__(self, signals, stt, tts, llmWrapper, prompter, modules=None):
if modules is None:
modules = {}
self.signals = signals
... |
kimjammer/Neuro | https://github.com/kimjammer/Neuro | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | tts.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:54.055585 | import time
from RealtimeTTS import TextToAudioStream, CoquiEngine
from constants import *
class TTS:
def __init__(self, signals):
self.stream = None
self.signals = signals
self.API = self.API(self)
self.enabled = True
engine = CoquiEngine(
use_deepspeed=True,
... |
kimjammer/Neuro | https://github.com/kimjammer/Neuro | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | utils/listAudioDevices.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:54.056093 | import pyaudio
py_audio = pyaudio.PyAudio()
info = py_audio.get_host_api_info_by_index(0)
# List all devices
# Mics
print("Microphones:")
for i in range(0, info.get('deviceCount')):
# Check number of input channels
# (If there is at least 1 input channel, then it is suitable as a microphone)
if py_audio.... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/actionPlugins/common.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:56.317305 | import wx
import threading
app = None
def initDialog(initFn):
global app
try:
return initFn()
except Exception:
try:
# Some Linux distributions ship incompatible wxPhoenix version.
# So we start a custom wxApp loop
app = wx.App()
app.InitLoca... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/actionPlugins/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:56.318831 | from dataclasses import dataclass
@dataclass
class KiKitActionPlugin:
package: str
name: str
description: str
availablePlugins = [
KiKitActionPlugin("hideReferences", "Show/hide references",
"Allows you to batch show or hide references based on regular expression"),
KiKitActionPlugin("pane... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | docs/resources/examplePost.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:56.736918 | from kikit.units import mm
from kikit.common import toKiCADPoint
def kikitPostprocess(panel, arg):
minx, miny, maxx, maxy = panel.panelBBox()
position = toKiCADPoint(((minx + maxx) // 2, miny + 2 * mm))
panel.addNPTHole(position, 3 * mm)
|
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/annotations.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:56.740009 | from __future__ import annotations
from typing import Dict, List, Set, Union
import numpy as np
import pcbnew
from kikit import units # type: ignore
from kikit.common import fromMm, readParameterList
KString = Union[str, pcbnew.UTF8]
def readKiKitProps(footprint):
"""
Given a footprint, returns a string cont... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/common.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:56.741153 | from __future__ import annotations
import sys
import traceback
from typing import List, Optional, Tuple, Union, Callable
from kikit.defs import Layer
from kikit.typing import Box
import pcbnew
from pcbnew import BOX2I, VECTOR2I, EDA_ANGLE
from kikit.intervals import AxialLine
import os
from itertools import product, ch... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/actionPlugins/panelize.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:56.742448 | import time
import traceback
from kikit.defs import EDA_TEXT_HJUSTIFY_T, EDA_TEXT_VJUSTIFY_T
import pcbnew
from kikit.panelize_ui_impl import loadPresetChain, obtainPreset, mergePresets
from kikit import panelize_ui
from kikit.panelize import NonFatalErrors, appendItem
from kikit.common import PKG_BASE, findBoardBoundi... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/defs.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:56.849521 | from enum import Enum, IntEnum
from .units import mm, inch
class Layer(IntEnum):
F_Cu = 0
B_Cu = 2
In1_Cu = 4
In2_Cu = 6
In3_Cu = 8
In4_Cu = 10
In5_Cu = 12
In6_Cu = 14
In7_Cu = 16
In8_Cu = 18
In9_Cu = 20
In10_Cu = 22
In11_Cu = 24
In12_Cu = 26
In13_Cu = 28
... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/actionPlugins/hideReferences.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:56.850818 | import pcbnew
import wx
import re
import os
import kikit
from kikit import modify
from kikit.defs import Layer
from kikit.common import PKG_BASE
from .common import initDialog, destroyDialog
class HideReferencesDialog(wx.Dialog):
def __init__(self, state, parent=None, board=None, action=None, updateState=None):
... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/drc_ui.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:57.844264 | import click
from enum import Enum
class ReportLevel(Enum):
warning = "warning"
error = "error"
def __str__(self):
return self.value
class EnumType(click.Choice):
def __init__(self, enum: Enum, case_sensitive=False):
self.__enum = enum
super().__init__(choices=[item.value for ... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/fab/jlcpcb.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:58.049319 | import click
import pcbnew
import csv
import os
import sys
import shutil
from pathlib import Path
from kikit.fab.common import *
from kikit.common import *
from kikit.export import gerberImpl
def collectBom(components, lscsFields, ignore):
bom = {}
for c in components:
if getUnit(c) != 1:
c... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/fab/common.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:58.050774 | import csv
from dataclasses import dataclass
from enum import Enum
import re
from typing import OrderedDict
from kikit.project import KiCADProject
import pcbnew
from math import sin, cos, radians
from kikit.common import *
from kikit.defs import MODULE_ATTR_T
from kikit.drc_ui import ReportLevel
from kikit import drc
f... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/fab/neodenyy1.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:58.628538 | import click
import pcbnew
import csv
import os
import sys
import shutil
import re
from pathlib import Path
from kikit.fab.common import *
from kikit.common import *
from kikit.units import mm
FOOTPRIINTREGEX = {
re.compile(r'Capacitor_SMD:C_(\d+)_.*'): 'C_{}',
re.compile(r'Diode_SMD:D_(\d+)_.*'): 'D_{}',
... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/fab/oshpark.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:58.836458 | import pcbnew
import os
import shutil
from pathlib import Path
from kikit.export import gerberImpl, exportSettingsOSHPark, fullGerberPlotPlan
from kikit.fab.common import ensurePassingDrc, expandNameTemplate
plotPlanNoVCuts = [(name, id, comment) for name, id, comment in fullGerberPlotPlan if name != "CmtUser"]
def e... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/fab/openpnp.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:58.876578 | import datetime
from pathlib import Path
import pcbnew
import kikit
from .common import ensurePassingDrc, ensureValidBoard, expandNameTemplate, naturalComponentKey
def exportOpenPnp(board, outputdir, drc, nametemplate):
ensureValidBoard(board)
loadedBoard = pcbnew.LoadBoard(board)
if drc:
ensur... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/fab/pcbway.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:59.218697 | import click
import pcbnew
import csv
import os
import re
import sys
import shutil
from pathlib import Path
from kikit.fab.common import *
from kikit.common import *
from kikit.export import gerberImpl, exportSettingsPcbway
def collectSolderTypes(board):
result = {}
for footprint in board.GetFootprints():
... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/fab_ui.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:59.501614 | import traceback
import sys
import click
from .common import execute_with_debug
def fabCommand(f):
"""
A decorator to add the same functionality to all fab commands
"""
# Note that the decorators has to be specified in a reverse order
f = click.argument("outputdir", type=click.Path(file_okay=False... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/info.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:59.502699 |
from kikit.pcbnew_utils import KICAD_VERSION
from kikit.common import KIKIT_LIB
import sys
import click
@click.command()
def kicadversion():
"""
Return version of KiCAD
"""
print(f"{KICAD_VERSION[0]}.{KICAD_VERSION[1]}")
@click.command()
def drcapi():
"""
Return version of the DRC API
"""... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/intervals.py | null | null | null | null | null | null | Python | 2026-05-04T01:49:59.796762 | from __future__ import annotations
import typing
from typing import Any, Dict, List, Optional, Union, Tuple, Callable, Iterable
from kikit.typing import Box, T, ComparableT
from itertools import islice, chain
from math import isclose
from copy import copy
class Interval:
"""
Basic interval representation
"... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/modify.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:00.081295 | from typing import Set
import pcbnew
from .defs import Layer
import re
def references(board: pcbnew.BOARD, show: bool, pattern: str,
allowedLayers: Set[Layer] = set(Layer.all()),
isSelectedItemOnly: bool = False) -> None:
"""
Show or hide references in a footprint.
"""
for... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/kicadUtil.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:00.177753 | from typing import Tuple
from .common import KiLength
from .units import mm
from .sexpr import SExpr, findNode
from .defs import PAPER_DIMENSIONS
def getPageDimensionsFromAst(ast: SExpr) -> Tuple[KiLength, KiLength]:
paperNode = findNode(ast, "paper")
if paperNode is None:
# KiCAD 5 board use "page" in... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/modify_ui.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:00.421740 | import click
@click.command()
@click.argument("board", type=click.Path(dir_okay=False, exists=True))
@click.option("--show/--hide", "-s", help="Show/hide references matching a pattern")
@click.option("--pattern", "-p", type=str, help="Regular expression for references")
def references(board, show, pattern):
"""
... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/panel_features/baseFeature.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:00.809113 | from ..panelize import Panel
class PanelFeature:
"""
Basic interface for various
"""
def apply(self, panel: Panel) -> None:
raise NotImplementedError("Implementation error: PanelFeature doesn't support applying")
|
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/panel_features/copperFill.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:01.033514 | from dataclasses import dataclass, field
from ..substrate import linestringToKicad
from ..defs import Layer
from ..common import KiAngle, KiLength, fromDegrees, fromMm
from ..pcbnew_utils import increaseZonePriorities
import pcbnew
from ..panelize import Panel
from .baseFeature import PanelFeature
from typing import An... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/panelize_ui.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:01.320384 | import click
import os
import csv
import io
import glob
import traceback
from kikit.panelize_ui_sections import *
PKG_BASE = os.path.dirname(__file__)
PRESETS = os.path.join(PKG_BASE, "resources/panelizePresets")
IS_CLICK_V8 = click.__version__.startswith("8.")
# We would like to support both, click v7 and v8 in orde... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/panelize_ui_impl.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:01.421745 | from kikit import panelize
from kikit.panel_features.copperFill import HatchedCopperFill, HexCopperFill, SolidCopperFill
from kikit.panelize_ui import Section, PresetError
from kikit.panelize import *
from kikit.defs import Layer
from shapely.geometry import box
from kikit.plugin import HookPlugin
from kikit.text impor... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/panelize_ui_sections.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:01.676885 | from dataclasses import dataclass
import os
from typing import Any, List
from kikit import plugin
from kikit.units import readLength, readAngle, readPercents
from kikit.defs import Layer, EDA_TEXT_HJUSTIFY_T, EDA_TEXT_VJUSTIFY_T, PAPER_SIZES
class PresetError(RuntimeError):
pass
ANCHORS = ["tl", "tr", "bl", "br",... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/pcbnew_utils.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:02.158428 | import pcbnew
KICAD_VERSION = tuple(int(x) for x in pcbnew.GetMajorMinorVersion().split("."))
def _attr(name, fallback):
"""Resolve a pcbnew attribute that was renamed between v9 and v10."""
v = getattr(pcbnew, name, None)
if v is not None:
return v
return getattr(pcbnew, fallback)
# KiCad 10... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/plugin.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:02.159023 | # This has nothing to do with KiKit plugins, instead, it is the registration
# routine for Action plugins. However, the original implementation used the name
# 'plugin'. In order not to break the existing PCM installations we import this
# and leave it here for at least a couple of months to ensure that everybody
# upg... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/drc.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:02.334021 | from __future__ import annotations
import json
import os
import re
import shutil
import subprocess
import sys
import tempfile
from dataclasses import dataclass, field
from typing import Any, Dict, Iterable, List, Optional, TextIO, Tuple
from pathlib import Path
import pcbnew
from kikit.pcbnew_utils import EDA_UNITS_M... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/present.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:02.462143 | import click
from pathlib import Path
import sys
import os
import json
import glob
import shutil
import subprocess
import tempfile
import markdown2
import pybars
from datetime import datetime
from kikit import export
def resolveTemplatePath(path):
"""
Return a correct template path:
- if the path matches a... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/export_ui.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:02.592537 | import click
@click.group()
def export():
"""
Export KiCAD boards
"""
pass
@click.command()
@click.argument("boardfile", type=click.Path(dir_okay=False))
@click.argument("outputdir", type=click.Path(file_okay=False), default=None)
def gerber(boardfile, outputdir):
from kikit.export import gerberIm... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/export.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:02.598191 | # Based on https://github.com/KiCad/kicad-source-mirror/blob/master/demos/python_scripts_examples/gen_gerber_and_drill_files_board.py
import sys
import os
import pcbnew
from pcbnew import *
from kikit.pcbnew_utils import DXF_UNITS_MM
from kikit.defs import Layer
fullGerberPlotPlan = [
# name, id, comment
("Cu... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/eeschema_v6.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:02.609392 | from dataclasses import dataclass, field
from kikit.sexpr import Atom, parseSexprF
from itertools import islice
import os
from typing import Optional
from copy import deepcopy
class SchematicError(RuntimeError):
pass
@dataclass
class Symbol:
uuid: Optional[str] = None
path: Optional[str] = None
unit: ... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/project.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:02.773007 | from typing import Union, Optional, Dict, Any
from pathlib import Path
from string import Template
from functools import cached_property
import pcbnew
import json
class KiCADProject:
"""
This code represents a KiCAD project and allows easy access to individual
files without the need to hassle with project... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/eeschema.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:02.774195 | # Simple, rather hacky parser for eeshema files (.sch). This is a mid-term
# workaround before proper support for scripting is introduced into Eeschema
import shlex
import os
class EeschemaException(Exception):
pass
def getField(component, field):
for f in component["fields"]:
n = f["number"]
... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/present_ui.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:02.778108 | import click
@click.command()
@click.argument("outdir", type=click.Path(file_okay=False))
@click.option("--description", "-d", type=click.Path(dir_okay=False),
required=True, help="markdown file with page text")
@click.option("--board", "-b", type=(str, str, click.Path(dir_okay=False)),
multiple=True, help="<n... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/stencil.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:03.255087 | import pcbnew
import numpy as np
import json
from collections import OrderedDict
from kikit.common import *
from kikit.defs import *
from kikit.substrate import Substrate, extractRings, toShapely, linestringToKicad
from kikit.export import gerberImpl, pasteDxfExport
from kikit.export import exportSettingsJlcpcb
import ... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/doc.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:03.318286 | import inspect
import tempfile
import subprocess
import shutil
import os
import sys
import threading
from itertools import chain
def header(func):
signature = inspect.signature(func)
args = [str(k) if v.default is inspect.Parameter.empty else str(k) + "=" + str(v.default)
for k, v in signature.paramete... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/stencil_ui.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:03.522432 | import click
import sys
from .common import execute_with_debug
@click.command()
@click.argument("inputBoard", type=click.Path(dir_okay=False))
@click.argument("outputDir", type=click.Path(dir_okay=True))
@click.option("--pcbthickness", type=float, default=1.6,
help="PCB thickness in mm")
@click.option("--thickne... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/text.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:03.523396 | import datetime as dt
from string import Template
from typing import Callable, Optional, Dict, Any
import pcbnew
class Formatter:
"""
Turns a function into a formatter. Caches the result.
"""
def __init__(self, fn: Callable[[], str], vars: Dict[str, str]={}) -> None:
self.fn = fn
self.... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/sexpr.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:03.523961 | from io import StringIO
from typing import Callable, Dict, Iterable, Optional, Union
# Simple white-space aware S-Expression parser (parsing and dumping yields the
# same result). Might not support all features of S-expression, but should be
# enough to properly parser KiCAD's S-Expressions
class ParseError(RuntimeEr... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/typing.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:03.545887 | from __future__ import annotations
from abc import abstractmethod
from typing import Tuple, TypeVar, Protocol
Box = Tuple[float, float, float, float]
class Comparable(Protocol):
"""Protocol for annotating comparable types."""
@abstractmethod
def __lt__(self, other: Any) -> bool:
pass
T = TypeVa... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | pcm/kikit/plugins/__init__.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:03.552218 | import wx
import wx.adv
class MissingKiKitDialog(wx.Dialog):
def __init__(self, parent=None):
wx.Dialog.__init__(self, parent, id=wx.ID_ANY, title=u"KiKit installation not found!",
pos=wx.DefaultPosition, size=wx.Size(500, 300), style=wx.DEFAULT_DIALOG_STYLE)
self.SetSiz... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/substrate.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:03.570385 | from shapely import geometry
from shapely.geometry import (Polygon, MultiPolygon, LineString,
MultiLineString, LinearRing, Point)
from shapely.geometry.collection import GeometryCollection
from shapely.ops import orient, unary_union, split, nearest_points
import shapely
import json
import numpy as np
from kikit.int... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/units.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:03.708262 | import re
import math
import pcbnew
from copy import deepcopy
class UnitError(RuntimeError):
pass
# Define unit conversion constants
mm = 1000000
cm = 10 * mm
dm = 100 * mm
m = 1000 * mm
mil = 25400
inch = 1000 * mil
deg = pcbnew.EDA_ANGLE(1, pcbnew.DEGREES_T)
rad = pcbnew.EDA_ANGLE(1, pcbnew.RADIANS_T)
UNIT_S... |
yaqwsx/KiKit | https://github.com/yaqwsx/KiKit | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | kikit/ui.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:03.716300 | import click
from kikit import (panelize_ui, export_ui, present_ui, stencil_ui,
modify_ui, fab_ui, drc_ui)
from kikit import __version__
import sys
@click.group(context_settings={"help_option_names": ["-h", "--help"]})
@click.version_option(__version__)
def cli():
pass
cli.add_command(export_ui.export)
cli.ad... |
cjolowicz/cookiecutter-hypermodern-python | https://github.com/cjolowicz/cookiecutter-hypermodern-python | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | {{cookiecutter.project_name}}/src/{{cookiecutter.package_name}}/__main__.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:05.820535 | """Command-line interface."""
import click
@click.command()
@click.version_option()
def main() -> None:
"""{{cookiecutter.friendly_name}}."""
if __name__ == "__main__":
main(prog_name="{{cookiecutter.project_name}}") # pragma: no cover
|
cjolowicz/cookiecutter-hypermodern-python | https://github.com/cjolowicz/cookiecutter-hypermodern-python | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | {{cookiecutter.project_name}}/docs/conf.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:05.826241 | """Sphinx configuration."""
project = "{{cookiecutter.friendly_name}}"
author = "{{cookiecutter.author}}"
copyright = "{{cookiecutter.copyright_year}}, {{cookiecutter.author}}"
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
"sphinx_click",
"myst_parser",
]
autodoc_typehints = "description"
... |
cjolowicz/cookiecutter-hypermodern-python | https://github.com/cjolowicz/cookiecutter-hypermodern-python | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | tools/dependencies-table.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:05.826741 | import re
from pathlib import Path
import tomli
PROJECT = Path("{{cookiecutter.project_name}}")
JINJA_PATTERN = re.compile(r"{%.*%}")
JINJA_PATTERN2 = re.compile(r"{{[^{]*}}")
LINE_FORMAT = " {name:{width}} {description}"
CANONICALIZE_PATTERN = re.compile(r"[-_.]+")
DESCRIPTION_PATTERN = re.compile(r"\. .*")
def... |
cjolowicz/cookiecutter-hypermodern-python | https://github.com/cjolowicz/cookiecutter-hypermodern-python | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | docs/conf.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:05.828474 | """Sphinx configuration."""
from datetime import datetime
project = "Hypermodern Python Cookiecutter"
author = "Claudio Jolowicz"
copyright = f"{datetime.now().year}, {author}"
extensions = ["sphinx.ext.intersphinx", "myst_parser"]
intersphinx_mapping = {"mypy": ("https://mypy.readthedocs.io/en/stable/", None)}
langu... |
cjolowicz/cookiecutter-hypermodern-python | https://github.com/cjolowicz/cookiecutter-hypermodern-python | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | hooks/post_gen_project.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:05.829003 | #!/usr/bin/env python
import json
from pathlib import Path
def reindent_cookiecutter_json():
"""Indent .cookiecutter.json using two spaces.
The jsonify extension distributed with Cookiecutter uses an indentation
width of four spaces. This conflicts with the default indentation width of
Prettier for J... |
cjolowicz/cookiecutter-hypermodern-python | https://github.com/cjolowicz/cookiecutter-hypermodern-python | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | tools/publish-github-release.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:05.835731 | import datetime
import sys
from typing import Optional
import click
import github3
def publish_release(*, owner: str, repository_name: str, token: str, tag: str) -> None:
github = github3.login(token=token)
repository = github.repository(owner, repository_name)
try:
[pull_request] = list(reposit... |
cjolowicz/cookiecutter-hypermodern-python | https://github.com/cjolowicz/cookiecutter-hypermodern-python | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | tools/prepare-github-release.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:05.836336 | import datetime
import subprocess
import sys
from pathlib import Path
from typing import Any
from typing import Iterable
from typing import List
from typing import Optional
import click
import github3
def git(*args: str, **kwargs: Any) -> str:
try:
process = subprocess.run(
["git", *args], ch... |
cjolowicz/cookiecutter-hypermodern-python | https://github.com/cjolowicz/cookiecutter-hypermodern-python | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | noxfile.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:05.840212 | """Nox sessions."""
from pathlib import Path
import shutil
import nox
from nox.sessions import Session
nox.options.sessions = ["docs"]
owner, repository = "cjolowicz", "cookiecutter-hypermodern-python"
labels = "cookiecutter", "documentation"
bump_paths = "README.md", "docs/guide.rst", "docs/index.rst", "docs/quickst... |
cjolowicz/cookiecutter-hypermodern-python | https://github.com/cjolowicz/cookiecutter-hypermodern-python | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | {{cookiecutter.project_name}}/noxfile.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:05.878757 | """Nox sessions."""
import os
import shlex
import shutil
import sys
from pathlib import Path
from textwrap import dedent
import nox
try:
from nox_poetry import Session
from nox_poetry import session
except ImportError:
message = f"""\
Nox failed to import the 'nox-poetry' package.
Please install... |
cjolowicz/cookiecutter-hypermodern-python | https://github.com/cjolowicz/cookiecutter-hypermodern-python | null | null | null | null | 1,914 | null | null | mit | null | null | null | null | null | null | null | {{cookiecutter.project_name}}/tests/test_main.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:06.476565 | """Test cases for the __main__ module."""
import pytest
from click.testing import CliRunner
from {{cookiecutter.package_name}} import __main__
@pytest.fixture
def runner() -> CliRunner:
"""Fixture for invoking command-line interfaces."""
return CliRunner()
def test_main_succeeds(runner: CliRunner) -> None:... |
erikrose/parsimonious | https://github.com/erikrose/parsimonious | null | null | null | null | 1,912 | null | null | mit | null | null | null | null | null | null | null | parsimonious/tests/benchmarks.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:09.205924 | """Benchmarks for Parsimonious
Run these with ``python parsimonious/tests/benchmarks.py``. They don't run during
normal test runs because they're not tests--they don't assert anything. Also,
they're a bit slow.
These differ from the ones in test_benchmarks in that these are meant to be
compared from revision to revis... |
erikrose/parsimonious | https://github.com/erikrose/parsimonious | null | null | null | null | 1,912 | null | null | mit | null | null | null | null | null | null | null | parsimonious/exceptions.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:09.216043 | from textwrap import dedent
from parsimonious.utils import StrAndRepr
class ParsimoniousError(Exception):
"""A base exception class to allow library users to catch any Parsimonious error."""
pass
class ParseError(StrAndRepr, ParsimoniousError):
"""A call to ``Expression.parse()`` or ``match()`` didn't ... |
erikrose/parsimonious | https://github.com/erikrose/parsimonious | null | null | null | null | 1,912 | null | null | mit | null | null | null | null | null | null | null | parsimonious/nodes.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:09.217592 | """Nodes that make up parse trees
Parsing spits out a tree of these, which you can then tell to walk itself and
spit out a useful value. Or you can walk it yourself; the structural attributes
are public.
"""
# TODO: If this is slow, think about using cElementTree or something.
from inspect import isfunction
from sys ... |
erikrose/parsimonious | https://github.com/erikrose/parsimonious | null | null | null | null | 1,912 | null | null | mit | null | null | null | null | null | null | null | parsimonious/tests/test_benchmarks.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:09.230532 | """Tests to show that the benchmarks we based our speed optimizations on are
still valid"""
import unittest
from functools import partial
from timeit import timeit
timeit = partial(timeit, number=500000)
class TestBenchmarks(unittest.TestCase):
def test_lists_vs_dicts(self):
"""See what's faster at int ke... |
erikrose/parsimonious | https://github.com/erikrose/parsimonious | null | null | null | null | 1,912 | null | null | mit | null | null | null | null | null | null | null | parsimonious/tests/test_expressions.py | null | null | null | null | null | null | Python | 2026-05-04T01:50:09.233571 | # coding=utf-8
from unittest import TestCase
from parsimonious.exceptions import ParseError, IncompleteParseError
from parsimonious.expressions import (Literal, Regex, Sequence, OneOf, Not,
Quantifier, Optional, ZeroOrMore, OneOrMore, Expression)
from parsimonious.grammar import G... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.