SyloraQ Python Module One Step Ahead
Project description
pip install SyloraQ
Run this so u can use the library.
pip install SyloraQ
Note on imports and the 🛡️ symbol:
If a function or class has the (🛡️) symbol:
Import it with
from SyloraQ.security import function_or_class
Otherwise:
Import withfrom SyloraQ import *
The nested symbols like 🛡️i or 🛡️i+ indicate layers of insideness (inside functions/classes of 🛡️ items), extending as needed.
Note on imports and the 🌐 symbol:
If a function or class has the (🌐) symbol:
Import it with
from SyloraQ.web import function_or_class
The nested symbols like 🌐i or 🌐i+ indicate layers of insideness (inside functions/classes of 🛡️ items), extending as needed.
wait(key="s", num=1)Pauses execution for a specified amount of time. The unit is controlled by the
keyparameter, which can be 's' for seconds, 'm' for minutes, or 'h' for hours.
ifnull(value, default)Checks if the given
valueis missing or empty. Returnsdefaultif so, otherwise returns the originalvalue.
switch_case(key, cases, default=None)Looks up the
keyin thecasesdictionary. If found, returns the corresponding value. If the value is callable (like a function), executes it. Returnsdefaultifkeynot found.
timer_function(func, seconds)Executes the function
funcafter waiting forseconds.
iftrue(var, function)Calls
functiononly ifvarisTrue.
iffalse(var, function)Calls
functiononly ifvarisFalse.
replace(string, replacement, replacement_with)Replaces occurrences of
replacementinstringwithreplacement_with.
until(function, whattodo)Repeatedly executes
whattodo()untilfunction()returnsTrue.
repeat(function, times)Executes
functiona specified number oftimes.
oncondit(condition, function_true, function_false)Executes
function_trueifconditionisTrue, otherwise executesfunction_false.
repeat_forever(function)Continuously executes
functionindefinitely.
safe_run(func, *args, **kwargs)Runs
funcsafely by catching and printing exceptions if they occur.
start_timer(seconds, callback)Calls
callbackafter waiting forseconds.
generate_random_string(length=15)Generates a random string of alphanumeric characters and symbols of specified
length.
get_ip_address()Returns the local IP address of the machine.
send_email(subject, body, to_email, mailname, mailpass)Sends an email via Gmail SMTP. Requires Gmail username (
mailname) and password (mailpass).
generate_unique_id()Generates and returns a unique ID using the
uuidmodule.
start_background_task(backtask)Runs the function
backtaskin a separate thread to run it in the background.
nocrash(func)Decorator that wraps
functo catch and log errors, preventing crashes.
parallel(*functions)Runs multiple
functionsconcurrently in separate threads.
gs(func)Returns the source code of the function
funcas a string.
Jctb(input_string)Converts a string into a binary representation, where each character is encoded as a 10-bit binary number.
Jbtc(binary_input)Converts a binary string (produced by
Jctb) back to the original string.
encode_base64(data)Encodes a string
datainto Base64.
decode_base64(encoded_data)Decodes a Base64 encoded string back to the original string.
reverse_string(string)Reverses the input
string.
calculate_factorial(number)Recursively calculates the factorial of
number.
swap_values(a, b)Swaps the values of
aandband returns the swapped values.
find_maximum(numbers)Finds and returns the maximum value in the list
numbers.
find_minimum(numbers)Finds and returns the minimum value in the list
numbers.
sum_list(lst)Returns the sum of elements in the list
lst.
reverse_list(lst)Returns a reversed version of the list
lst.
is_prime(n)Returns
Trueifnis a prime number, otherwise returnsFalse.
split_into_chunks(text, chunk_size)Splits a string
textinto chunks of sizechunk_size.
unique_elements(lst)Returns a list of unique elements from the input list
lst.
calculate_average(numbers)Returns the average of a list of numbers.
calculate_median(numbers)Returns the median of a list of numbers.
count_words(text)Counts and returns the number of words in the input string
text.
count_sentences(text)Counts and returns the number of sentences in the input string
text.
add_commas(input_string)Adds commas between characters in the input string.
remove_spaces(text)Removes all spaces from the input string
text.
calculate_square_root(number)Approximates the square root of
numberusing the Newton-Raphson method.
find_files_by_extension(directory, extension)Returns a list of files in the directory that have the specified file extension.
get_curr_dir()Returns the current working directory.
check_if_file_exists(file_path)Checks if a file exists at
file_path.
monitor_new_files(directory, callback)Continuously monitors the directory for new files and calls
callbackwhenever new files are added.
get_system_uptime()Returns the system's uptime in seconds.
get_cpu_templinux()Retrieves the CPU temperature on a Linux system.
monitor_file_changes(file_path, callback)Monitors the file for changes and calls
callbackwhen the file is modified.
write_to_file(filename, content)Writes the
contentto the specifiedfilename.
read_from_file(filename)Reads and returns the content of the file specified by
filename.
parse_json(json_string)Parses a JSON string and returns the corresponding Python object.
create_file_if_not_exists(filename)Creates a file if it doesn't already exist.
create_directory(directory)Creates the specified directory if it doesn't exist.
get_cpu_usage()Returns the current CPU usage percentage using
psutil.
get_memory_usage()Returns the current memory usage percentage using
psutil.
create_zip_file(source_dir, output_zip)Creates a ZIP archive of the specified
source_dir.
extract_zip_file(zip_file, extract_dir)Extracts a ZIP archive to the specified
extract_dir.
move_file(source, destination)Moves a file from
sourcetodestination.
copy_file(source, destination)Copies a file from
sourcetodestination.
show_file_properties(file_path)Displays properties of a file (size and last modified time).
start_http_server(ip="0.0.0.0", port=8000)Starts a simple HTTP server on the given
ipandport.
stop_http_server()Stops the running HTTP server.
get_server_status(url="http://localhost:8000")Checks if the server at the given URL is up and running.
set_server_timeout(timeout=10)Sets the timeout for server connections.
upload_file_to_server(file_path, url="http://localhost:8000/upload")Uploads a file to a server at the specified URL.
download_file_from_server(file_url, save_path)Downloads a file from the server and saves it to
save_path.
CustomRequestHandlerA custom request handler for the HTTP server that responds to specific paths ("/" and "/status").
start_custom_http_server(ip="0.0.0.0", port=8000)Starts a custom HTTP server using the
CustomRequestHandler.
set_server_access_logs(log_file="server_access.log")Configures logging to store server access logs.
get_server_logs(log_file="server_access.log")Retrieves and prints the server access logs.
restart_http_server()Restarts the HTTP server.
check_internet_connection()Checks if the system has internet connectivity by pinging
google.com.
create_web_server(directory, port=8000)Serves the contents of a directory over HTTP on the specified port.
create_custom_web_server(html, port=8000)Serves custom HTML content over HTTP on the specified port.
JynParser(rep)Executes a Python script passed as
repin a new context (usingexec()).
contains(input_list, substring)Checks if the given
substringexists within any element ofinput_list.
Jusbcam(Device_Name)Scans connected USB devices and checks if
Device_Nameis present in the list of detected devices.
claw()A customizable HTTP server with:
- Custom HTML & subdomains
- IP and port settings (default
0.0.0.0:8000)- Logging control
- Custom 404 page
- Auth token for API
- POST
/api/messagefor sending messages
ConsoleCam()Records and returns changes in the console output for a specific part.
prn()A faster printing function than standard
print().
Key(KeyName)Simulates keyboard actions:
.press(),.release(),.tap().type_text(text).press_combo(tuple_of_keys)
copy_to_clipboard(text)Copies
textto system clipboard.
count_occurrences(lst, element)Counts occurrences of
elementinlst.
get_curr_time()Returns the current date and time in the format
YYYY-MM-DD HH:MM:SS.
is_palindrome(s)Checks if the string
sis a palindrome (same forward and backward).
get_min_max(list)Returns the minimum and maximum values from the list.
is_digits(input)Checks if the
inputis a string consisting only of digits.
create_dict(keys, values)Creates a dictionary by pairing elements from
keysandvalues.
square_number(input)Returns the square of the number
input.
get_file_size(file_path)Gets the size of the file at
file_path.
find_duplicates(lst)Finds and returns duplicate elements from the list
lst.
get_average(list)Calculates the average of the numbers in the list.
divide(a, b)Divides
abyband handles division by zero.
extract_numbers(s)Extracts all numbers from the string
s.
BinTrigA class with multiple methods to bind various Tkinter window and widget events to custom functions, such as mouse movements, key presses, window resize, focus changes, etc.
ByteJarSets/Deletes/Gets Cookies with a 3rd party lightweight program. Download Link
letterglue(str="", *substr, str2="")Joins strings and substrings into one string.
letterglue_creator(word)Generates code to convert each letter of a word into variables and joins them using
letterglue.
Baudio("filename=audio_data", mode="Write", duration=5, Warn=True)Records audio for a specified duration, saves to a
.Baufile, returns it or plays it. Requires a lightweight program. Usage:Baudio(filename="my_recording", mode="Write", duration=5, Warn=True)
BtupleA utility class with methods like:
.count(*words)- counts total words.get(index, *words)- retrieves word at index.exists(item, *words)- checks existence.first(*words)- gets first word or error.last(*words)- gets last word or error
isgreater(*nums)Compares two numbers; returns
Trueif first is greater, else error if input invalid.
runwfallback(func, fallback_func)Runs
func(), if it fails runsfallback_func()instead.
retry(func, retries=3, delay=1)Tries running
func()multiple times with delays. ReturnsNoneif all attempts fail.
fftime(func)Measures and prints the execution time of
func().
debug(func)Logs function calls, arguments, and return values for debugging.
paste_from_clipboard()Retrieves and returns text from the system clipboard.
watch_file(filepath, callback)Monitors file changes and triggers
callback()on modification.
is_website_online(url)Checks if the
urlis reachable; returnsTrueif online.
shorten_url(long_url)Generates and returns a shortened URL.
celsius_to_fahrenheit(c)Converts Celsius
cto Fahrenheit.
fahrenheit_to_celsius(f)Converts Fahrenheit
fto Celsius.
efv(string)Parses code string for variables, returns dictionary of variables. Example:
parser = efv("x=5,y=2"); print(parser['y'])outputs2.
Hpass(limit=30)Generates a strong password of specified length (
limit).
l(input)Converts input into a list.
dl(input)Converts a list input into a string.
mix(input)Returns a "mix" of the input (details depend on implementation).
sugar(input)"Sugars" (super salts) the input (details depend on implementation).
get_type(value)Returns the type and string representation of
value.
CacheClassA simple caching system to store and retrieve key-value pairs.
cantint(egl, ftw, tw)Performs comparisons on values based on provided parameters and clears the
twlist if certain conditions are met.
flatten(obj)Flattens a nested list (or iterable) into a single iterable.
memoize(func)Caches the result of a function to optimize performance.
chunk(iterable, size)Breaks down a large iterable (e.g., list, string) into smaller chunks of a specified size.
merge_dicts(*dicts)Merges multiple dictionaries into one.
deep_equal(a, b)Checks if two objects (lists or dictionaries) are deeply equal.
split_by(text, size)Splits a string into chunks of a given size.
GoodBye2SpyClassA class that encapsulates several password and data processing techniques for security-related tasks.
Passworded(Method insideGoodBye2Spy)Provides functionality for creating and verifying password hashes with key mixing and randomization.
Shifting(Method insideGoodBye2Spy)Implements a hashing function that uses bitwise operations on the input data.
Oneway(Method insideGoodBye2Spy)Creates a one-way hashed value using a combination of key mixing and a shifting hash technique.
slc(code: str)Strips and parses the provided Python code to remove unnecessary line breaks and spaces.
AI(text,questions=None,summarize_text=False,summary_length=3)It can answer questions or summarize the
text.
GAI(Method insideAI)It can answer and summarize text. (Better than
summarizewhen it comes to QA.)
summarize(Method insideAI)It can summarize text. (Better than
GAIwhen it comes to summarizing.)
requireADMIN(For windows only!)Shuts the program with an error when opened if not run as Administrator.
__get_raw_from_web(url)Returns the raw text from the raw text
url(Module).
@privateWraps the function so it can only be used within the class where it's defined.
OTKeySystemA class that can verify user without needing a database. Has web version.
creator(timestamp=25)(Method insideOTKeySystem)Generates one-time usable, location and program reopen proof key.
verifier(key,timestamp=25)(Method insideOTKeySystem)Verifies keys generated by
creatorwithout any database (timestampmust be the same!).
remove(input,*chars)Removes all elements from
charslist if they exist in the input text.
get_screen_size()Returns screen size (width, height).
NCMLHS(data: str, shift_rate1=3, shift_rate2=5, rotate_rate1=5, rotate_rate2=7, bits=64)Shifts, rotates, shifts, and rotates the data again.
remove_duplicates(lst)Removes all duplicates from the
lstlist if they exist.
uncensor(input)Uncensors censored content from the
inputtext such asH311@toHello(accuracy approx. 85%).
BendableListsA class for managing multiple named lists that can be created, extended, or queried dynamically.
create(list_name)(Method insideBendableLists)Initializes a new empty list with the specified name, unless it already exists.
add(list_name, *elements)(Method insideBendableLists)Adds one or more elements to the specified list if it exists.
remove(list_name, element)(Method insideBendableLists)Removes a specific element from a named list, if both the list and element exist.
get(list_name)(Method insideBendableLists)Retrieves the contents of a list by name; returns
Noneif the list doesn't exist.
Nexttime(func, func2)Executes
functhe first time it's called, then alternates withfunc2on subsequent calls using a toggled internal state key ("runnext").
HttpA class that can get and post requests to the web.
get(Method insideHttp)Returns scraped data from url.
post(Method insideHttp)Posts a request to a url and returns the response.
getos()Returns the OS where the script runs.
str2int(input)Returns character positions in alphabet based on
inputsuch asabcto123oracbto132.
int2str(input)Does the opposite of
str2int.
shiftinwin(shiftrate,text)Shifts
textwith the rate ofshiftrateand returns it, e.g.,shiftinwin(5,Hii)cycles characters.
runwithin(code,call,params)Runs the
codecallingclass > function()orclass.function()with theparams.
- 🛡️
LockerA class that can lock or unlock a string based on a key (numbers not supported).
- 🛡️i
Lock(Method insideLocker)Locks the
databased onkeyand returns it.
- 🛡️i
Unlock(Method insideLocker)Unlocks the locked data with
keyand returns it.
alphabet_shift(text, shiftrate)Shifts
textby the amount ofshiftrateand returns it, e.g.,"ABC",1→"BCD".
wkint(script, expire=5)Waits until
expireseconds expire. Useneveras expire for no expiry.
countdown(from_to_0)Counts down every second and prints until
from_to_0reaches 0.
inviShadeA class that turns any input into a single invisible character and another that decodes it back to the full original message.
encode(Method insideinviShade)Encodes input text to a single invisible char.
decode(Method insideinviShade)Reverses encoding.
boa(string, option, pin)Returns
optionfrom thepininstring.
Example:boa("Hello//abc", b or before, "//")outputsHellobecause it comes before//. Ifafter, outputsabc.
- 🛡️
QuasarA class that turns any input into a single invisible character and another that decodes it back to the full original message.
- 🛡️i
encode(Method insideQuasar)Encrypts input.
- 🛡️i
decode(Method insideQuasar)Reverses encrypting.
@time_limited_cache(seconds)Like
memoize()but caches results only forsecondsperiod of time.
GlowShellA utility class that provides styled printing, cursor control, and animated frame playback in the terminal.
print(message, fg=None, bg=None, bold=False, underline=False, dim=False, bright=False, blink=False, end="\n")(Method insideGlowShell)Prints the
messagewith given color and style settings. Automatically resets the style after printing.
clear()(Method insideGlowShell)Clears the entire terminal screen and moves the cursor to the top-left corner.
clear_line()(Method insideGlowShell)Clears the current line only, leaving the rest of the terminal untouched.
move_cursor(row, col)(Method insideGlowShell)Moves the terminal cursor to the specified
rowandcolumn.
hide_cursor()(Method insideGlowShell)Hides the blinking terminal cursor until shown again.
show_cursor()(Method insideGlowShell)Shows the terminal cursor if it was previously hidden.
test()(Method insideGlowShell)Demonstrates usage of styles, colors, cursor movement, and clearing capabilities. Useful for checking terminal support.
animate_frames(frames, ...)(Method insideGlowShell)This function displays a sequence of multi-line text frames (like ASCII art) in the terminal, one after the other, with optional looping and formatting like color, bold, delay, etc.-------------------------------------------------------------------------------------------------------------------------------- | Key | Description | Values | |-----------|--------------------------|---------------------------------------------------------------------------------------| | `fg` | Foreground (text) color | `"black"`, `"red"`, `"green"`, `"yellow"`, `"blue"`, `"magenta"`, `"cyan"`, `"white"` | | `bg` | Background color | Same as `fg` colors | | `bold` | Bold text | `true` or `false` | | `dim` | Dim text | `true` or `false` | |`underline`| Underline text | `true` or `false` | | `bright` | Bright color variation | `true` or `false` | | `blink` | Blinking text | `true` or `false` | | `delay` | Delay time for this frame| Any positive number like `0.3`, `1`, etc. (Seconds) | --------------------------------------------------------------------------------------------------------------------------------frames = [ "--/fg:green,bold:true,delay:1/--\nThis is a green bold frame.", "--/fg:yellow,dim:true,delay:0.5/--\nNow it's dim and yellow.", "--/fg:red,bg:white,blink:true,delay:0.3/--\nRed on white and blinking." ]
@lazy_propertyA property decorator that computes a value once on first access and caches it for later use.
- 🌐
BrowSentinel(headless=True, port=9222)High-level browser controller class that manages a headless Chrome instance with remote debugging enabled on the specified port. Provides methods to control browsing, page navigation, interaction, and automation.
- 🌐i
start()(Method insideBrowSentinel)Launches Chrome with remote debugging enabled, connects to the first available browser page, and enables key domains (
Page,DOM, andNetwork) to prepare for interaction.
- 🌐i
navigate(url)(Method insideBrowSentinel)Navigates the browser to the specified URL. Returns a response including frame and loader identifiers.
- 🌐
reload()(Method insideBrowSentinel)Reloads the current page.
- 🌐
back()(Method insideBrowSentinel)Navigates back in the browser history by retrieving the navigation history and navigating to the previous entry.
- 🌐
forward()(Method insideBrowSentinel)Navigates forward in the browser history similarly by using navigation history.
- 🌐
set_viewport(width, height, deviceScaleFactor=1)(Method insideBrowSentinel)Overrides the viewport size and device scale factor to emulate different screen sizes and pixel densities.
- 🌐
evaluate(script)(Method insideBrowSentinel)Executes JavaScript code within the current page context and returns the result value.
- 🌐
get_html()(Method insideBrowSentinel)Retrieves the full HTML markup of the current page.
- 🌐
get_text()(Method insideBrowSentinel)Retrieves the visible text content of the page (equivalent to
document.body.innerText).
- 🌐
click(selector)(Method insideBrowSentinel)Simulates a mouse click on the first element matched by the given CSS selector.
- 🌐
type(selector, text)(Method insideBrowSentinel)Sets the value of the input element matched by the selector and dispatches an input event, simulating user typing.
- 🌐
wait_for(selector, timeout=5)(Method insideBrowSentinel)Waits asynchronously until an element matching the selector appears on the page or the timeout is reached.
- 🌐
screenshot(path="page.png")(Method insideBrowSentinel)Captures a screenshot of the current page and saves it as a PNG file at the specified path.
- 🌐
close()(Method insideBrowSentinel)Closes the browser session and terminates the Chrome process cleanly.
The
BrowSentinelclass provides a minimal yet robust interface for controlling a headless Chrome browser via Chrome DevTools Protocol. It enables navigation, DOM interaction, scripting, viewport control, and screenshot capture all without external dependencies beyond Python’s standard library and a local Chrome installation.
Typical workflow:
- Instantiate the browser object:
Browser = BrowSentinel()- Start the browser and connect:
browser.start()- Navigate pages, interact with elements, evaluate (run JavaScript in the page), capture screenshots or extract page data
- Close when done:
browser.close()
Try out this:
```python
t2s="""
function replaceTextWithSyloraQ() {
const walker = document.createTreeWalker(
document.body,
NodeFilter.SHOW_TEXT,
null,
false
);
let node;
while (node = walker.nextNode()) {
if (node.nodeValue.trim() !== "") {
node.nodeValue = "SyloraQ";
}
}
}
replaceTextWithSyloraQ();
"""
if __name__ == "__main__":
b = BrowSentinel()
print("Starting browser...")
b.start()
b.navigate("https://example.com")
b.screenshot()
inp=len(input("Please Check the file then delete it before pressing enter>"))
if inp-inp==0:
b.evaluate(t2s)
b.screenshot()
b.close
```
🌐
api(port)(Works with@endpoint())Creates an api server
🌐
@endpoint(name)(Works withapi())Adds and endpoint to the api server.
Try out this: ```python import time def run_api(port=8381): @endpoint("hello") def hello_endpoint(body, headers): name = body.get("input") if isinstance(body, dict) else None if headers.get("Token") == "YourToken": return {"message": f"Hello, {name}!"} else: return {"error": "Sorry, invalid token"}
api(port=port)
print(f"API server running on port {port} with endpoint '/api/hello'")
try:
while True:time.sleep(10000000)
except KeyboardInterrupt:
print("Server stopped.")
run_api(8381)
```
Then run on ur cmd:
bash curl -X POST http://localhost:8381/api/hello ^ -H "Content-Type: application/json" ^ -H "Token: my-secret-token" ^ -d "{\"input\":\"Alice\"}"
stick_overlay(tk_win, process_name="Notepad.exe", x_offset=20, y_offset=60, interval=30)Creates a dynamic overlay window that tracks the position of the main window of a given process by name, updating the overlay’s position in real-time.
similarity(sentence1, sentence2, drama_mode=False)Calculates a similarity score between two sentences.
class JsonifyA utility class for advanced JSON manipulation. Supports conversion from strings/files, deep access and modification, merging, validation, searching, and exporting.
from_string(json_string)Parses a JSON string into a
Jsonifyobject usingjson.loads().
frs(string)Parses loose or malformed string in the form
"key1:val1,key2:val2"into aJsonifyobject.
from_file(filepath)Loads JSON from a file and returns a
Jsonifyinstance.
to_string(pretty=False)Converts the internal JSON data back into a string. If
pretty=True, outputs formatted JSON.
to_file(filepath, pretty=False)Saves the internal JSON to a file. Supports pretty formatting.
get(key, default=None)Gets value by dot notation key (
"a.b.c"or"a.0.b"for lists). Returnsdefaultif not found.
set(key, value)Sets value by dot notation key. Creates nested structures if necessary.
remove(key)Removes value by dot notation key. Returns
Trueif removed, elseFalse.
merge(other)Deep-merges another
dictorJsonifyinto the current data. Keys are recursively updated.
search(pattern, search_keys=True, search_values=True)Regex-based search over keys and/or string values. Returns list of matching dot notation paths.
validate_keys(required_keys)Ensures all given dot-notation keys exist in data. Returns
Trueif all exist.
copy()Returns a deep copy of the current
Jsonifyinstance.
clear()Clears the internal data (dict or list). If another type, resets to empty dict.
class TextifyA utility class for applying functions over characters, words, groups, or sentences in a text.
for_every_char(do)Applies function
do(char)to every character in the text.
for_every_word(do)Applies function
do(word)to every word in the text (split by whitespace).
for_every_group(n, do)Applies function
do(group)to each substring group of sizen.
for_every_sentence(do)Applies function
do(sentence)to each sentence (split using punctuation and space).
result()Returns the processed text.
def exists(string, pin)Checks if
pinexists withinstring.Returns
Trueif found, elseFalse.
🌐
UrlValidate(url)Validates a URL. (The url must be published on internet!)
def Shut()Suppresses all standard output, error, and logging temporarily.
Returns a tuple of original output/logging states for restoration.
def UnShut(origins)Restores original stdout, stderr, print, and logging.
originsshould be the tuple returned byShut().
class ZypherTrailEncodes and decodes text using a vertical zigzag (rail fence-like) cipher.
encode(string, max_row=5)Encodes text in a zigzag pattern up to
max_row. Returns a multi-line string.
decode(encoded_str)Decodes the zigzag-encoded string back to its original form.
NLDurationParser(seconds: int, full=False)Converts a number of seconds into a human-readable duration string, choosing the largest suitable unit (seconds, minutes, hours, days, or years). When
fullisTrue, uses full unit names; otherwise, uses abbreviations.
justify(words, max_width)Formats a list of words into fully justified lines of a given width. Distributes spaces evenly between words, padding the last line with spaces on the right.
draw_tree(path, prefix="")Recursively prints a visual tree of directories and files starting from a specified path. Uses branch and indent symbols to represent file system hierarchy.
@prefix(pfx)A decorator that scans command-line arguments and calls the decorated function with arguments matching a specific prefix (with the prefix removed).
SQS(path)A configuration file manager supporting global keys and named sections. Loads, reads, writes, deletes, toggles, and saves config values, parsing expressions and inline comments.
#This is a comment!
# Global variables
debug = true
max_retries = 5
pi_value = 3.14159
# Section with variables
[network]
host = "localhost"
port = 8080
# Conditional assignment
if max_retries >= 3 then retry_mode = "aggressive"
# Toggle a boolean
toggle debug
# Arithmetic operation
max_retries += 2
# Copy value from one key to another
set retry_count to max_retries
# etc.
read(key, default=None, section=None)(Method insideSQS)Retrieves a stored value from the specified section or global scope, returning a default if key is missing.
write(text)(Method insideSQS)Parses and processes multiple lines of config expressions from a text block, updating internal state.
delete(key, section=None)(Method insideSQS)Removes a key from a given section or the global config if no section specified.
has_key(key, section=None)(Method insideSQS)Checks existence of a key in a section or globally.
save()(Method insideSQS)Writes current global keys and all sections with their keys back to the config file, preserving format.
reload()(Method insideSQS)Clears internal data and reloads configuration from the file.
to_dict()(Method insideSQS)Returns the entire configuration as a nested dictionary with globals and sections.
PYCifyUtility class for compiling Python source files into bytecode and loading compiled modules dynamically.
compile(source_path, pyc_path=None)(Method insidePYCify)Reads a Python source file, compiles it into bytecode, writes the
.pycfile with correct header info (magic number, timestamp).
load(pyc_path, module_name)(Method insidePYCify)Loads a compiled
.pycfile as a Python module by name, enabling dynamic imports from bytecode.
tts(text,gender)Plays the audio of a
gender (male/female)sayingtext. This is a basictext to speechso dont expect very much from it.;)
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
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 syloraq-3.0.tar.gz.
File metadata
- Download URL: syloraq-3.0.tar.gz
- Upload date:
- Size: 81.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8c0244c494fbaf88674174074323b3f598fdf0a3afa603033b86f6dbe2298c1
|
|
| MD5 |
38cb213e83e8ba09030f558a5d83e9c9
|
|
| BLAKE2b-256 |
4044042eb2071018ff04a00910cd552b546049c34dca450d8cb405fdda0cdb4f
|
File details
Details for the file syloraq-3.0-py3-none-any.whl.
File metadata
- Download URL: syloraq-3.0-py3-none-any.whl
- Upload date:
- Size: 59.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b791a28709916f8b28a92e19a14c6567a136ed2a68aff53105e30a82e4e6d8a0
|
|
| MD5 |
9e7bb589e7310cc97adccee80be2ef0b
|
|
| BLAKE2b-256 |
3f20fe89357730ff9dec9e028c2b00ec7618766491c2109dbec1b3c612725c22
|