toolbox.py Documentation v1.5.1.1

Developer guide and API map for the current toolbox.py module. This page is aligned with __version__ = "1.5.1.1" and calls out optional dependencies, side effects, and compatibility behavior.

Contents

Overview

toolbox.py is a general-purpose utility module containing:

It is designed as a broad utility library for rapid Python development, especially in backend, data, and tooling workflows.

Import: the module is a single file, so consumers normally use import toolbox or import selected names directly. Several integrations require optional third-party packages or local data files; see the relevant section before deploying a feature.

Core Concepts

The module combines unrelated but commonly useful utilities into a single file. Key themes include:

Runtime Requirements and Side Effects

The standard library covers only part of the module. Dependencies are loaded at different times, so a successful import toolbox does not prove that every feature is ready to use.

DependencyUsed byLoading behavior
requests, urllib3Synchronous downloads and updater requestsrequests is deferred until first attribute access.
aiohttp, multidictAsync HTTP, service plugins, URL query dataWrapped by DelayModuleLoad; a missing package may fail only when the feature is first used.
matplotlibStatistical plottingOptional and deferred.
jsondb2, sqliteObj, aiosqliteObjQueue/cache/database-backed features and plugins.UserManagerImported conditionally. Missing aiosqliteObj no longer triggers installation at startup; UserManager may request it when used. sqliteObj may still be installed through the updater during import.
pygmentsHTML source/traceback formattingOptional; formatter classes exist only when it imports.
Local data filesCountry, Android-device, and user-agent helpersSome lookups depend on resources available beside the application.

Important: importing this module currently enables AUTO_UPDATER and calls pmblue_update.self_update(). If pmblue_update is missing, the import path attempts to download it. The missing-updater bootstrap still uses its legacy HTTP URL. Provision pmblue_update before import to avoid that bootstrap. Account for this network and file-write side effect in offline builds, tests, and restricted production environments.

DelayModuleLoad

Purpose

Defers module import until the module is actually used.

Constructor

DelayModuleLoad(module_name, name_as=None, module_to_globals=True)

Behavior

Important Method

__getattr__(self, name)

Loads the real module, optionally replaces the placeholder, then resolves the requested attribute.

Example

asyncio = DelayModuleLoad("asyncio")
await asyncio.sleep(1)

Async HTTP Wrapper

AiohttpResponse

Defined in the aiohttp feature block. Because aiohttp is represented by a deferred loader, a missing installation can surface on first request rather than at module import.

Purpose

Wraps aiohttp responses in a more requests-like interface.

Constructor

AiohttpResponse(response, elapsed, data)

Key Properties

PropertyDescription
contentRaw response bytes
textDecoded text using response encoding
json()Parses JSON from content
status / status_codeHTTP status code
headersResponse headers
cookiesCookie dictionary
urlResolved response URL
elapsedRequest duration

Async Request Methods

await AiohttpResponse.get(...)
await AiohttpResponse.post(...)
await AiohttpResponse.delete(...)
await AiohttpResponse.ping(...)

Download Utilities

download_file_async

async def download_file_async(url, dest_path, chunk_size=1024*1024, verbose=False, as_gzip=False): ...

When as_gzip=True, pass a destination without a .gz suffix; the current implementation appends it.

download_file

def download_file(url, dest_path, chunk_size=1024*1024): ...

Formatting Utilities

FunctionDescription
dec_amt(n)Applies variable decimal rounding based on magnitude
format_time_sec(sec)Formats seconds or timedelta into ps/ns/us/ms/s/m/h/d/w
format_size(size)Formats bytes into b/kb/mb/gb
format_number(number)Adds commas and trims unnecessary decimals
format_currency(number)Formats as $1,234.56
format_name(name)Normalizes capitalization for names

Benchmarking

TestManager

Measures performance across a fixed number of iterations or a fixed time window.

Examples

tm = TestManager(trial_amt=1000)

@tm.test_func
def test():
    pass

tm.run()
tm.print_results()

Key Options

ArgumentDescription
trial_amtNumber of iterations to run
trial_timeHow long to keep iterating
test_trialWhether to subtract loop overhead estimate

Important Methods

MethodDescription
test_func(func)Registers a test function
run()Runs the registered test function
start_trial()Starts manual timing
end_trial()Ends manual timing
print_results()Prints trial count, total duration, and average duration
txt_results()Returns a text summary

Statistical Utilities

FunctionDescription
remove_outliers(data)Removes values outside 1.5 × IQR
get_sd_dev(data)Computes mean absolute deviation-like value, not a classic standard deviation
get_total(data)Sums values
get_median(data)Median for sorted sequences
is_even(amt)Returns parity boolean

DataInfo and DataInfoMisc

DataInfo

Analyzes numeric datasets and exposes cached summary statistics.

Constructor

DataInfo(data)

Main Properties

PropertyDescription
lenDataset size
totalSum of values
avgAverage
medianMedian
modeMost frequent value
iqrFirst and third quartile pair
range(min, max)
sd_devSample standard deviation
avg_devAverage absolute deviation from mean
skewedSkew approximation using mean, median, and sd

Main Methods

MethodDescription
sorted_data()Sorts and returns dataset
avg_no_outliers()Average excluding outliers
is_outlier(n)IQR-based outlier test
get_zscore(n)Returns z-score
get_item(n)Returns DataInfo.Item for a value
get_percentile(n)Returns percentile, including interpolation in some cases
info_txt()Full text summary
basic_info_txt()Reduced summary
print()Prints full summary
basic_print()Prints reduced summary

Nested Type: DataInfo.Item

Represents a distinct numeric value in the dataset.

AttributeDescription
numberThe numeric value
frequencyCount of occurrences
zscoreCached z-score
is_outlierCached outlier status
percentileCached percentile

DataInfoMisc

Similar in structure to DataInfo, but designed for more general sortable values and supports reverse sorting.

Filesystem Utilities

dir_size(dir_path)

Recursively computes total directory size.

FileInfo

FileInfo(x)

x may be a path-like value, an os.DirEntry, or a directory entry with callable is_dir()/stat(). Pass an existing FileInfo's path to construct fresh metadata. Paths are normalized to forward slashes, but relative inputs remain relative.

PropertyDescription
nameFilename
pathSupplied path with forward-slash separators
is_dirWhether entry is a directory
sizeFile size or recursive directory size
modifiedModification timestamp
created_atPlatform-dependent ctime, converted to local datetime

FileInfo Methods

MethodDescription
all_files()Returns non-recursive file list
all_files_recursive()Returns recursive file list

scan_for_file(file)

Checks whether the given path exists and returns its FileInfo, or None.

Table and TxtTable

Table

Simple ASCII table builder.

MethodDescription
add_column(name, length=None)Adds a column
add_row(*args)Adds a row
print(limit=None, send=True)Renders the table as text

Support Classes

TxtTable

Enhanced table builder supporting text output, HTML export, searching, sorting, and Flask-friendly pagination.

Important Methods

MethodDescription
add_column(...)Adds a column, optionally with computed/default values
insert_column(...)Inserts a column at a position
add_row(...)Adds a row
remove_column(col_num)Removes a column
print(...)Renders text table
to_html(...)Renders table as HTML
flask_pagination(...)Builds paginated, searchable, sortable output for Flask requests

HTML Export

table.to_html(max_len=100, condensed=True)

Flask Pagination Notes

flask_pagination() reads request args like page, rows_per_page, search, sort_by, case, and adv, then filters and formats the selected rows.

Dictionary Utilities

FunctionDescription
iter_dict(d)Generator yielding (key, value)
sort_dict(d, key=None, reverse=False)Sorts dictionary items into a new ordered dictionary

Conversion Utilities

to_numb(s)

Attempts string-to-number conversion:

CSV and Collection Utilities

CSVReader

Static helpers for reading, writing, and condensing CSV data. The default result is a ListTable with header-indexed Row objects; as_list=True returns raw row lists, and row.dict() converts a row.

MethodUse
read(arg, has_headers=True, as_list=False)CSV-aware parser; accepts the file-like inputs supported by the file conversion helpers.
basic_read(arg, has_headers=True, as_list=False, forgiving=False, by_line=None)Fast parser. forgiving tolerates malformed row widths; by_line supports large inputs without reading the entire file first.
basic_read_threaded(..., amt_per_thread=20000, max_workers=None)Splits parsing work across a thread pool.
no_quotes_read(...)Optimized path for data known not to contain quoted fields.
condense(fp, has_headers=True, unique_only=False, remove_func=None, remove_columns=[])Reduces a CSV while optionally removing rows/columns and duplicate rows.
write(rows) / write_file(fp, rows)Serialize rows to CSV text or a destination.

Avoid reusing and mutating the default list passed to remove_columns; pass an explicit list in new code.

Indexed and constrained collections

TypeBehavior
ListTable(rows, has_headers=True, read_only=True)Wraps row data with header-based access and exports individual rows with row.dict(); use a list comprehension for all rows.
CacheList(max_cache_size=100)List plus a lookup cache. Use get(key, default); mutating methods keep the cache synchronized.
Unique(max_items=None)List-like collection that prevents duplicates and can cap retained items.
UniqueDict()Stores unique values by type and exposes the flattened values through all().
ListIndex(d, key=str, f_idx=0, nested_indexes=None)Binary-search-backed index with exact, case-insensitive, list, and index-returning lookups.
SortedList(d, key=str, reverse=False)Maintains sorted order when values are appended.
AttrDict(data={})Intended dictionary wrapper with attribute access and get(); current constructor recursively accesses its unset storage and can raise RecursionError. Use a normal dict until repaired.
merge_iters(*args)Iterates several input iterables as one sequence.
ReverseListIter(item)Reverse iterator for list-like data.
IterLoop(i)Cycles repeatedly over an iterable.

Related helpers are randomize_list, count_dict, count_print, make_json_parsable, and dict_print.

Descriptors and Caching

DescriptorBehavior
AsyncPropertyAllows an async method to be awaited through property syntax.
CachedProperty(func=None, expire=None)Caches an async or sync property per instance; supports expiration, explicit cache inspection, and replacement by assignment.
ClassPropertyEvaluates a getter against the class rather than an instance.
CachedClassProperty(func=None, expire=None)Class-level cached property with optional expiration.
class Service:
    @CachedProperty(expire=60)
    async def status(self):
        return await load_status()

service = Service()
status = await service.status

These are custom descriptors. Async values use await obj.property, not a method call.

Text, URL, and Matching Utilities

APIPurpose
StringInfo(s)String inspection, character counts, average word length, checks, and URL discovery.
LinkInfo(url)URL decomposition, base URL, query-string parsing, hashing, and link discovery.
TxtParser(format_txt, ..., handle_not_found=False, possible_chars=['[', ']'])Extracts named variables from format patterns; supports optional segments and regex-backed parsing.
TxtParserExpExperimental parser variant with the same pattern-oriented interface.
TxtParserBasicSmaller parser without optional-character configuration.
split / split_multiCurrent regex-optimized case-sensitive or case-insensitive splitting functions.
split_old / split_multi_oldCompatibility implementations retained for callers that depend on the previous behavior.
MatchingNormalization-aware match/within and fuzzy equivalents with configurable thresholds. See the dedicated guide below.

Additional small helpers include get_between, get_all_between, extract_int, place_suffix, bytes_to_str, word_to_digit, name_to_normal, convert_to_normal, convert_to_single_letters, and the intentionally misspelled compatibility function equivilency_convert.

RandomString

get* methods use the ordinary random source. Prefer secure_get, secure_get_alpha, secure_get_num, or secure_get_alphanum for tokens and credentials.

Timestamp IDs and Base Conversion

These helpers are available in the current 1.5.1.1 source. The ID format combines a base62 Unix-millisecond timestamp prefix with a random alphanumeric suffix.

APIReturn and behavior
base10_to_base36(n)Integer to text using 0–9A–Z.
base10_to_base62(n)Integer to text using 0–9A–Za–z.
peyton_day_timestamp(dt=None)Integer millionths of a day since 2000-01-01 00:00:00 UTC. Uses current time when dt is omitted.
peyton_id_prefix(dt=None, leading_zeros=True)Base62 Unix-millisecond timestamp text, padded to eight characters by default.
peyton_id_prefix_to_timestamp(prefix)Decodes a 4–8-character base62 prefix to a naive local datetime, despite its timestamp-oriented name.
peyton_id(dt=None, length=16)Timestamp prefix plus ordinary random suffix.
peyton_id_secure(dt=None, length=16)Timestamp prefix plus a suffix generated with secrets.
import datetime
import toolbox

created_at = datetime.datetime.now(datetime.timezone.utc)
record_id = toolbox.peyton_id(dt=created_at, length=24)
decoded_local_time = toolbox.peyton_id_prefix_to_timestamp(record_id[:8])

print(toolbox.base10_to_base36(35))  # Z
print(toolbox.base10_to_base62(61))  # z
secure_record_id = toolbox.peyton_id_secure(length=32)

The timestamp prefix is predictable and reveals approximate creation time; the secure variant only makes the suffix cryptographically random. Neither function checks for collisions or validates requested length. Supply an integer length greater than eight when randomness is required. The conversion functions require integers; negative values currently produce an empty string. Use timezone-aware datetime inputs when the intended epoch must be unambiguous.

For an opaque random token without a timestamp, use the existing RandomString.secure_get_alphanum(size) helper.

Matching

Matching is a configurable text-comparison namespace. It can normalize Unicode, ignore spaces, collapse repeated characters, apply phonetic substitutions, treat an asterisk as a positional wildcard, and compare either complete strings or a substring window.

Version 1.5 adds Matching.Methods.levenshtein_local(a, b), returning an integer edit distance. The main fuzzy methods continue to use positional matching; they do not select this algorithm automatically.

Matching.Methods.levenshtein_local("kitten", "sitting")
# 3

Public API

APIPurpose
Matching.Methods.levenshtein_local(a, b)Case-sensitive edit distance; counts insertions, deletions, and substitutions without normalization.
Matching.Settings(...)Stores the transformation and comparison options used by match() and within().
Matching.match(txt1, txt2, settings=None)Transforms both inputs, then compares the complete resulting strings.
Matching.within(txt1, txt2, settings=None)Transforms both inputs, then tests whether the first occurs within the second.
Matching.fuzzy_match(txt1, txt2, threshold=.8)Low-level positional, case-insensitive similarity check. It does not run the normalization pipeline.
Matching.fuzzy_within(txt1, txt2, threshold=.8)Low-level sliding-window fuzzy search. It does not run the normalization pipeline.
Matching.default_settingsShared Settings() instance used when no settings object is supplied.

Settings

Matching.Settings(
    normalize=True,
    extraneous_characters=False,
    ignore_spaces=False,
    match_asterisk=False,
    fuzzy_threshold=1,
    phonetic=False,
)
SettingDefaultExact behavior
normalizeTrueRuns convert_to_normal(), using Unicode NFKD decomposition and the module's custom Unicode-name transliteration rules.
extraneous_charactersFalseCollapses consecutive duplicate characters with convert_to_single_letters(). Despite the name, it does not remove punctuation.
ignore_spacesFalseRemoves ordinary space characters from both inputs. It does not explicitly remove tabs or newlines.
match_asteriskFalseTreats * as a wildcard for one character at the same position. It is not a glob wildcard and does not match an arbitrary-length sequence.
fuzzy_threshold11 selects exact comparison. Other values use the fraction of equal character positions; typical values are between 0 and 1.
phoneticFalseRuns the module's ordered phonetic substitutions, such as ph → f, c → k, and several vowel/syllable equivalences.

Transformation pipeline

match() and within() transform both inputs in this order:

  1. If enabled, normalize Unicode and visually related characters with convert_to_normal().
  2. If enabled, remove ordinary spaces.
  3. Apply interchange substitutions: 0 → o, @ → a, $ → s, 1 → i, z → 2, and + → t.
  4. If enabled, collapse consecutive duplicate characters.
  5. If enabled, apply ordered phonetic substitutions.
  6. Apply wildcard handling, then perform exact or fuzzy full-string/substring comparison.

Case behavior: normalization lowercases text. With normalize=False, match() can be case-sensitive on the exact path, while within() and low-level fuzzy comparisons still lowercase. Interchange substitutions are always applied by the high-level methods. This differs from the older standalone normalize module.

Choosing a method

NeedUse
Compare two complete values with configurable normalizationMatching.match()
Find a normalized value inside longer textMatching.within()
Compare character positions without normalizationMatching.fuzzy_match()
Search fixed-width windows without normalizationMatching.fuzzy_within()

Examples

# Default comparison: normalized, case-insensitive, exact.
Matching.match("Héllô", "hello")
# True

# Interchange substitutions are always applied.
Matching.match("0scar", "Oscar")
# True

# Ignore formatting spaces.
compact = Matching.Settings(ignore_spaces=True)
Matching.match("AB 123", "AB123", compact)
# True

# Collapse repeated consecutive letters.
dedupe = Matching.Settings(extraneous_characters=True)
Matching.match("hello", "helo", dedupe)
# True

# Asterisk matches one position, not an arbitrary substring.
masked = Matching.Settings(match_asterisk=True)
Matching.match("h*llo", "hello", masked)
# True

# Require at least 80% equal character positions.
fuzzy = Matching.Settings(fuzzy_threshold=.8)
Matching.match("12345", "12344", fuzzy)
# True

# Apply the module's phonetic substitutions.
phonetic = Matching.Settings(phonetic=True)
Matching.match("phone", "fone", phonetic)
# True

# Search inside a longer transformed string.
Matching.within("Main St", "10 Main Street")
# True

Behavioral caveats

Recommended reusable configuration

name_matching = Matching.Settings(
    normalize=True,
    ignore_spaces=True,
    extraneous_characters=False,
    phonetic=True,
    fuzzy_threshold=.9,
)

if Matching.match(submitted_name, stored_name, name_matching):
    ...

For identity, authentication, compliance, or deduplication decisions, treat this class as one signal rather than definitive proof of a match.

Network, IP, and Request Utilities

TypePurpose and important behavior
CountryInfo(key=None, compressed_requests=False)Country metadata lookup.
IpInfo(ip=None, data=None)Synchronous IP metadata with IPv4/IPv6 validation, dictionary output, reverse DNS, and a process cache.
AsyncIpInfo(ip=None, data=None)Async IP lookup with memory/file/SQLite cache modes. Cache records expire after one week by default and can be configured through class settings.
WebRequestInfo(user_agent, ip)Combines user-agent and IP context and can confirm major crawler networks with forward/reverse DNS checks.
StandardRequest(request)Normalizes request objects from supported web frameworks into common path, scheme, query, IP, body, and user-agent accessors.
UserAgent(txt)Parses device, OS, browser, versions, mobile/tablet state, and bot identity.

Request-aware user-agent parsing

request = StandardRequest(framework_request)
ua = UserAgent.from_request(request)
if ua and ua.is_mobile:
    print(ua.browser, ua.browser_version)

UserAgent.from_request considers Client Hints as well as the User-Agent header and accepts both a native request object and StandardRequest. Current parsing includes modern iPhone Safari formats, tolerates malformed version strings, and adds the UserAgent.Formats.bot6 pattern for ClaudeBot-style crawler headers.

ZF_REQ and run_code(code, **kwargs) are specialized internal-facing helpers; inspect their implementation before exposing them to untrusted input. Never pass untrusted code to run_code.

Time, Queues, and Interchange Formats

APIPurpose
Timeto_min, parse_datetime, parse_time, parse_date, and date-format generation.
epoch(epoch_timestamp=None)Converts between epoch-oriented values and the module's datetime representation.
TimeEstimate(amt=None, print_every=None, ...)Tracks completed work, elapsed/average duration, percent complete, and estimated completion.
ActionQueue(queue_file='queue.json', queue_file_type=None, loop_interval=60, remove_on_err=True)Persists scheduled actions and runs registered handlers. create_action accepts datetime, date, timedelta, and supported numeric activation values.
iCalendar(name, uid, ...)Adds events and generates iCalendar text.
vCard(first_name, last_name, ...)Adds phone/email/address/organization metadata and generates a contact card.
Version(v_str)Comparable, normalized dotted-version value used by compatibility checks.
calendar = iCalendar("Support rota", "[email protected]")
calendar.add_event("On call", "event-1", starts_at, ends_at)
ics_text = calendar.generate()

Address, Phone, and Identity Types

Address

Address(d, correct_address=True, parse_address=True) accepts a string, mapping, or supported address-like value. It normalizes street suffixes, state abbreviations, ZIP/postal codes, and common misplaced fields. Use Address.parse_address(text) for direct parsing, to_dict() for serialization, and compare_address for normalized comparison. Aliases include street, street2, zip_code, and postal_code. Version 1.5 uses precomputed street-suffix and state-name lookups to speed up parsing.

PhoneNumber

PhoneNumber(number) normalizes a phone number and exposes e164, domestic_format, and international_format.

Other domain types

TypePurpose
AndroidDevice / AgentFormatDevice catalog and user-agent format support.
Permission.evaluate_permission(primary, evaluate)Checks exact, prefix, suffix, and wildcard-style permission relationships.
Extra(...)Manages encoded non-standard database-column data, with dictionary or list-like mutations followed by save().
BivariateData(data) / Slope(slope, yint)Correlation, regression slope, and linear equation representation.

Service Plugins

Integrations are grouped under the lowercase plugins namespace; instantiate a nested class directly.

Mailgun

mailgun = plugins.Mailgun(api_key, domain,
    default_from="Support <[email protected]>",
    default_archive_to="[email protected]")

response = await mailgun.send_email(
    "Welcome", "[email protected]", html="<p>Hello</p>"
)

send_email accepts one of text, html, or template, plus CC/BCC, reply-to, template variables, and per-message archive_to. The per-message value overrides the constructor default.

Twilio

twilio = plugins.Twilio(account_sid, auth_token, default_from="+15551234567")
await twilio.send_sms("+15557654321", body="Hello")

lookup = await twilio.lookup(
    "+15557654321",
    ["line_status", "line_type_intelligence"]
)
active = lookup.line_status.is_line_active if lookup.line_status else None

lookup(phone_number, lookup_fields, **params) accepts a field string or list and forwards additional query parameters. It returns plugins.Twilio.LookupNumber, which retains response-style properties such as status_code, headers, text, json(), and raise_for_status(), while also exposing parsed caller_name, identity_match, line_status, and line_type_intelligence objects.

identity_match(..., **params) formats supported birth dates as YYYYMMDD and accepts an Address, mapping, or string. Convenience methods line_status(phone) and is_line_active(phone) return parsed status; the latter is tri-state: True, False, or None when unknown.

UserManager

plugins.UserManager(dbm, tbl_name='users', mfa_tbl=None, session_validator=None) integrates with aiosqliteObj. It creates required user/session columns, hashes passwords, caches users, and manages persisted sessions. Nested types include User, UserSession, UserSession.Validation, and MFA.

Function and Class Glossary

Alphabetical glossary of the public toolbox API. “Conditional” entries exist only when their optional dependency is available.

Classes

NameDefinition
ActionQueuePersistent scheduler that maps named actions to handlers and executes them when activated.
AddressParses, normalizes, serializes, and compares postal addresses.
AgentFormatAssociates a text parser with user-agent OS, device, mobile, and tablet metadata.
AiohttpResponseRequests-like wrapper around a fully read aiohttp response; conditional on aiohttp support.
AndroidDeviceRepresents and looks up Android device metadata from the module's device catalog.
AsyncIpInfoAsynchronous IP metadata lookup with configurable memory, file, or SQLite caching.
AsyncPropertyDescriptor that exposes an async getter through property syntax.
AttrDictDictionary wrapper whose keys are also accessible as attributes.
BivariateDataCalculates correlation and a fitted slope from paired numeric observations.
CachedClassPropertyClass-level cached descriptor with optional time-based expiration.
CachedPropertyInstance-level cached descriptor supporting async values, expiration, inspection, and replacement by assignment.
CacheListList-like collection with an auxiliary lookup cache for fast retrieval.
CellTyped cell value used internally by Table.
ClassPropertyDescriptor that evaluates a property getter against the class.
CodeFormatPygments-backed HTML formatter for Python, console, and traceback text; conditional on Pygments.
ColumnColumn metadata, width, and totals support for Table.
CountryInfoLoads country metadata and resolves countries from supported keys.
CSVReaderNamespace for standard, fast, threaded, streaming, and quote-free CSV parsing and writing.
DataInfoCached descriptive statistics for numeric datasets, including quartiles, outliers, and z-scores.
DataInfoMiscDescriptive-statistics variant for broader sortable values and reverse ordering.
DelayModuleLoadProxy that imports a module the first time an attribute is accessed.
ExtraReads and mutates encoded list/dictionary data stored in a database column.
FileInfoNormalized file/directory metadata with child and recursive file enumeration.
iCalendarBuilder for events and serialized iCalendar content.
IpInfoSynchronous IP metadata, validation, serialization, reverse DNS, and caching.
IterLoopIterator that restarts at the beginning whenever its input sequence is exhausted.
LinkInfoParses URLs into host, path, query, domain, and link-discovery information.
ListIndexBinary-search-oriented index over a list, including exact and case-insensitive lookups.
ListTableHeader-aware wrapper for rows with dictionary export.
MatchingConfigurable normalized, positional-wildcard, phonetic, exact, containment, and fuzzy text matching; includes nested Settings.
merge_itersIterator class that yields several iterables as a single sequence.
PermissionNamespace for evaluating exact and wildcard-like permission strings.
PhoneNumberNormalized phone number with E.164, domestic, and international formatting.
pluginsNamespace containing the Mailgun, Twilio, and UserManager integrations and their response/session types.
RandomStringNamespace for ordinary and cryptographically secure random strings by character set.
ReqInfoSerializable request snapshot with parsed URL, user-agent, IP, location, and crawler checks.
ReverseListIterIterator that traverses a list-like value in reverse.
RowRow container used internally by Table.
ServerAnalyticsMinimal analytics state container retaining a bounded set of recent requests.
SlopeValue object for a linear slope and y-intercept.
SortedListList that inserts appended values while preserving configured sort order.
StandardRequestAdapter exposing common request fields across supported web frameworks.
StringInfoString analysis helper for character, word, pattern, and link inspection.
TableBasic fixed-width text table composed of columns, rows, and cells.
TestManagerBenchmark runner supporting fixed iteration counts, time windows, and manual trials.
TimeNamespace for duration conversion and flexible date/time parsing.
TimeEstimateProgress tracker that estimates remaining time, completion time, and average duration.
TxtParserPattern parser that extracts named values and supports optional sections.
TxtParserBasicReduced named-value pattern parser without optional-section configuration.
TxtParserExpExperimental variant of the named-value text parser.
TxtTableEnhanced text table with CSV/HTML output and Flask-oriented filtering, sorting, and pagination.
UniqueList-like collection that rejects duplicates and can cap retained items.
UniqueDictType-grouped unique-value collection with flattened access.
UserAgentParses browser, OS, device, version, mobility, and crawler identity from headers.
vCardBuilder for contact details serialized as vCard text.
VersionNormalized, comparable dotted-version value.
WebRequestInfoCombines an IP and user agent and confirms known crawler networks through DNS.
ZF_REQSpecialized proxy downloader that requests compressed remote content and unwraps the ZIP response.

Functions

NameDefinition
base10_to_base36, base10_to_base62Convert a nonnegative integer to the documented base alphabet.
peyton_day_timestampReturns integer millionths of a day since the start of 2000 UTC.
peyton_id_prefixEncodes the Unix-millisecond timestamp as a base62 prefix.
peyton_id_prefix_to_timestampDecodes a prefix into a naive local datetime.
peyton_id, peyton_id_secureBuild timestamp-prefixed IDs using ordinary or secure random suffixes.
bytes_to_strDecodes bytes by trying the module's supported encodings.
convert_to_normalApplies Unicode NFKD decomposition and custom character-name replacements, returning lowercase text. Phonetic conversion is a separate function.
convert_to_single_lettersCollapses consecutive duplicate characters.
count_dictBuilds a frequency mapping, optionally using custom comparison or estimation.
count_printPrints frequency information with an optional output-line limit.
dec_amtChooses a decimal precision based on numeric magnitude.
dict_printPrints a dictionary as formatted JSON-like text.
dir_sizeReturns the recursive byte size of a directory.
download_fileStreams a URL to disk synchronously, with a legacy-TLS retry path.
download_file_asyncStreams a URL to disk asynchronously with progress and optional gzip output; conditional on aiohttp.
epochReturns the current epoch, converts an epoch to datetime, or converts a datetime to epoch.
equivilency_convertApplies phonetic-equivalence substitutions; the misspelling is part of the public API.
extract_intExtracts digit characters from a value and returns them as a string.
file_arg_to_bufferNormalizes supported path, byte, string, or file-like inputs to a binary buffer.
file_arg_to_fileNormalizes supported inputs to an opened file-like object.
file_arg_to_fpResolves a supported file argument to its filesystem path when possible.
file_arg_to_strReads or converts a supported file argument to text.
format_currencyFormats a numeric value as dollar currency.
format_nameApplies person-name capitalization rules.
format_numberAdds grouping separators and removes unnecessary decimal zeros.
format_sizeFormats a byte count with a human-readable unit.
format_time_secFormats seconds or a timedelta using an appropriate duration unit.
get_all_betweenReturns every substring bounded by start and end delimiters.
get_betweenReturns the first substring bounded by start and end delimiters.
get_medianReturns the middle value (or midpoint pair) and assumes the supplied sequence is already sorted.
get_sd_devCalculates the module's deviation metric; see the statistics caveat above.
get_totalSums the supplied data.
haversineCalculates great-circle distance between two latitude/longitude points.
is_class_instanceTests whether a value appears to be an instantiated class object.
is_evenReturns whether a numeric amount is even.
is_json_parsableRecursively checks whether a value can be represented by the module's JSON rules.
iter_dictYields dictionary key/value pairs.
make_json_parsableRecursively converts common non-JSON values into serializable representations.
name_to_normalMaps a Unicode character-name string to a custom replacement; returns None when no mapping exists.
obj_attr_printPrints selected attributes from an object.
obj_attr_txtReturns selected object attributes as text.
place_suffixReturns an English ordinal suffix such as st, nd, rd, or th.
quick_saveWrites data to a path or supported file destination with minimal setup.
randomize_listReturns a randomly reordered copy of a list.
remove_outliersReturns data inside the module's 1.5-IQR outlier bounds.
run_codeExecutes Python code while capturing stdout or a traceback; unsafe for untrusted input.
scan_for_fileReturns FileInfo for an existing path, or None.
sort_dictReturns a dictionary ordered by key or a supplied sort callback.
splitCurrent optimized split implementation with count and case-sensitivity controls.
split_multiSplits text on any of several delimiters.
split_multi_oldCompatibility implementation of multi-delimiter splitting.
split_oldCompatibility implementation of single-delimiter splitting.
to_numbConverts numeric-looking strings to int or float and leaves other inputs unchanged.
word_to_digitConverts a supported written number word to a digit value.

Public API Index

This index lists every non-underscore top-level function and class in version 1.5.1.1. Some classes are support types normally created by a higher-level API.

AreaPublic symbols
Loading and HTTPDelayModuleLoad, AiohttpResponse (when aiohttp is available), download_file_async (when aiohttp is available), download_file
Formatting and numbersdec_amt, format_time_sec, format_size, format_number, format_currency, format_name, to_numb, place_suffix, extract_int
Statistics and measurementTestManager, remove_outliers, get_sd_dev, get_total, get_median, is_even, DataInfo, DataInfoMisc, BivariateData, Slope, TimeEstimate
Files and serializationdir_size, FileInfo, scan_for_file, bytes_to_str, file_arg_to_str, file_arg_to_buffer, file_arg_to_file, file_arg_to_fp, quick_save, make_json_parsable, is_json_parsable
Tables and CSVTable, Column, Row, Cell, TxtTable, CSVReader, ListTable
Collectionsiter_dict, sort_dict, merge_iters, randomize_list, IterLoop, CacheList, Unique, UniqueDict, count_dict, ReverseListIter, ListIndex, SortedList, AttrDict, count_print, dict_print
DescriptorsAsyncProperty, CachedProperty, ClassProperty, CachedClassProperty
Text and parsingRandomString, get_all_between, get_between, StringInfo, LinkInfo, obj_attr_print, obj_attr_txt, TxtParserExp, TxtParser, TxtParserBasic, split_multi_old, split_old, split_multi, split, word_to_digit, name_to_normal, convert_to_normal, convert_to_single_letters, equivilency_convert, Matching, CodeFormat (when Pygments is available)
Network and requestsZF_REQ, CountryInfo, IpInfo, AsyncIpInfo, AndroidDevice, AgentFormat, UserAgent, WebRequestInfo, StandardRequest, ServerAnalytics, ReqInfo
Timestamp IDs and basespeyton_day_timestamp, peyton_id_prefix, peyton_id_prefix_to_timestamp, peyton_id, peyton_id_secure, base10_to_base36, base10_to_base62
Time and formatsTime, epoch, ActionQueue, iCalendar, vCard, Version
Domain and integrationsAddress, Extra, PhoneNumber, Permission, plugins, haversine, is_class_instance, run_code

Changes Since the Previous Docs

This guide describes the distributed source at 1.5.1.1. Recent additions and retained features include:

Design Notes

Examples

DataInfo

di = DataInfo([1, 2, 3, 4, 100])
print(di.info_txt())

Table

t = Table()
t.add_column("Name")
t.add_column("Value")
t.add_row("A", 100)
t.add_row("B", 200)
t.print()

AiohttpResponse

resp = await AiohttpResponse.get("https://example.com")
print(resp.text)

Object and function guide

Most toolbox APIs fit one of three calling styles: plain functions return converted values, namespace classes such as CSVReader expose functions called directly on the class, and stateful objects such as TxtTable hold data across method calls. Async methods must be awaited; custom async properties use await object.property.

FamilyInput and resultState or side effect
Formatting functionsformat_number, format_currency, format_size, and format_time_sec return display strings. place_suffix(21) returns only "st".Use the original numeric value for calculations. to_numb only converts recognized numeric-looking strings and may return the original input.
FileInfo(path)Metadata object with name, path, is_dir, byte size, and datetime modified/created_at.Reads filesystem metadata immediately; directory construction calculates recursive size. Timestamps are naive local datetimes; created_at uses platform-dependent stat ctime.
DataInfo(data)Numeric collection summary with cached len, total, avg, median, range, and other statistics. get_item(value) returns a DataInfo.Item with frequency and lazy statistics.Keeps your input list and may sort it in place. Pass a copy if ordering matters. Cached results do not automatically refresh after arbitrary mutation; create a new DataInfo for changed data.
TxtTable(...)add_column returns Column, add_row returns Row, and a Row's data contains Cell objects with underlying/display values.print(send=False) returns text; the default also prints. CSV and HTML exports return strings. Add columns before rows and pass one value per column.
CSVReaderListTableListTable.RowRead methods return a ListTable by default. Index a row with a column name or integer, or call row.dict(). as_list=True returns raw row lists, including the header row.Reads consume file-like inputs. Parsers materialize the result even when input reading is line-oriented. Use [row.dict() for row in table]; current ListTable.dict() references a nonexistent attribute.
TxtParser(format_txt, ...)Callable parser object. Named placeholders such as <name> become dictionary keys; calling it returns a dictionary or None when no match is found.Compiles its pattern during construction. handle_not_found=True uses looser matching and can return None-valued fields. It is a pattern helper, not an input-validation schema.
CacheList(max_cache_size=100)get(key, default=None) retrieves a stored object; pop(index=-1) removes and returns one; append/add/remove return None.Uses a key dictionary plus an eviction queue. Set stringify_func(callable) before adding values. Re-appending an existing key refreshes eviction order but retains the original object.

scan_for_file(path) returns a FileInfo when the path exists, otherwise None. FileInfo.all_files() and all_files_recursive() return filename strings, not FileInfo objects or reliable full paths; recursive results can contain the same basename from different subdirectories.

Many namespace methods omit self; call CSVReader.read(...), Time.parse_time(...), and Matching.match(...) on the class. Constructing and calling them as ordinary instance methods may pass an unexpected argument.

Worked example: CSV to a formatted report

The default CSV result is a ListTable. Its rows support header-based indexing; the report creates separate typed cells so numeric display formatting can apply. No external file or service is required after the import-time updater setup.

import io
import toolbox

csv_input = io.StringIO("name,amount\nAda,1200\nGrace,85.5\n")
data = toolbox.CSVReader.basic_read(csv_input)
report = toolbox.TxtTable(format_numbers=True)
report.add_column("Name")
report.add_column("Amount")

for row in data:
    report.add_row(row["name"], toolbox.to_numb(row["amount"]))

print(report.print(send=False))
plain_records = [row.dict() for row in data]
print(plain_records[0]["name"])  # Ada
csv_output = toolbox.CSVReader.write([
    ["name", "amount"],
    *[[record["name"], record["amount"]] for record in plain_records],
])
print(csv_output)

CSVReader.write(rows) expects an iterable of row sequences and returns text. write_file(path, rows) also writes/closes its destination. condense() rewrites its input file. The custom serializer quotes commas and quotes but does not cover every multiline CSV case; use Python's standard csv module when general CSV interoperability is required.

Worked example: indexed cache and cached properties

CacheList stores objects by the key returned by your callback. Looking up a key does not refresh its eviction position. In this example, adding a third distinct key evicts the first because the capacity is two.

import toolbox

cache = toolbox.CacheList(max_cache_size=2)
cache.stringify_func(lambda item: item["id"])
cache.append({"id": "a", "name": "Ada"})
cache.append({"id": "b", "name": "Grace"})
print(cache.get("a")["name"])  # Ada
cache.append({"id": "c", "name": "Linus"})
print(cache.get("a"))  # None
print(cache.pop()["name"])  # Linus

class Report:
    def __init__(self, values):
        self.values = list(values)
        self.calculations = 0

    @toolbox.CachedProperty(expire=60)
    def total(self):
        self.calculations += 1
        return sum(self.values)

report = Report([10, 20])
print(report.total, report.total, report.calculations)  # 30 30 1
print(Report.total.is_cached(report))  # True
report.total = 40  # Explicitly replace the cached value.
print(report.total)  # 40

CachedProperty accepts an expiry in seconds or a timedelta. Read the descriptor through the class, as in Report.total.is_cached(report) and get_cached(report). Assignment replaces the cached value and resets its expiry; a decorated setter may transform the assigned value. There is no public cache-clear method. A changed underlying list does not invalidate the property automatically.

Worked example: parse and normalize contact fields

TxtParser captures strings; convert each field explicitly. PhoneNumber strips nondigits, assumes +1 for ten digits, and treats extra leading digits as a country code. It formats values but does not validate real numbering-plan assignments.

import toolbox

parser = toolbox.TxtParser("<name> ; <phone>")
fields = parser("Ada Lovelace ; (212) 555-0100")
if fields is None:
    raise ValueError("Expected name ; phone")

phone = toolbox.PhoneNumber(fields["phone"])
print(phone.e164)  # +12125550100
print(phone.domestic_format)  # (212) 555-0100
print(phone.country_code, phone.area_code)  # +1 212

address = toolbox.Address({
    "address1": "10 Main Street",
    "address2": None,
    "city": "New York",
    "state": "NY",
    "zip": "10001",
}, correct_address=False)
print(address.street)
print(address.to_dict()["zip"])
print(toolbox.Matching.match("Héloise", "HELOISE"))  # True

Address owns mutable address1, address2, city, state, and zip fields. street, street2, zip_code, and postal_code are read aliases. to_dict() returns those five fields; parsed_address and compare_address are cached string properties, not methods. Construct a new Address after changing fields if fresh cached normalization is required. Address normalization does not verify postal deliverability.

Worked example: asynchronous HTTP response

This example requires aiohttp and network access. The response helpers consume the response body before returning AiohttpResponse. Then content, text, and json() are synchronous byte/string/decoded-JSON accessors; await the request, not those accessors.

import asyncio
import aiohttp
import toolbox

async def main():
    response = await toolbox.AiohttpResponse.get(
        "https://example.com/",
        timeout=aiohttp.ClientTimeout(total=10),
    )
    response.raise_for_status()
    print(response.status_code, response.url)
    print(len(response.content), response.elapsed.total_seconds())
    print(response.text[:80])

asyncio.run(main())

get, post, and delete forward arguments to aiohttp requests and return AiohttpResponse. headers, cookies, status_code/status, url, encoding, and elapsed provide response metadata. raise_for_status() raises for HTTP errors; methods do not call it automatically. ping() issues a GET, closes the response without loading its body, and returns None.

Complete source API

Generated from modules/toolbox.py; version 1.5.1.1. Includes public functions, classes, directly declared methods, properties, and Python protocol methods. Conditional APIs may require optional dependencies. Inherited members and dynamically assigned attributes are explained in the guide where relevant.

Signatures and docstrings are extracted without importing or running the module. A property or AsyncProperty decorator changes how a member is accessed; see its decorators and the guide.

Classes and objects

Module functions

class DelayModuleLoad

Source line 16

Construct: DelayModuleLoad(module_name, name_as=None, module_to_globals=True)

Declared functions, properties, and nested objects:

DelayModuleLoad.__init__(self, module_name, name_as=None, module_to_globals=True)

Source line 18

ParameterPassing conventionDefault / required
module_namepositional or keywordrequired
name_aspositional or keywordNone
module_to_globalspositional or keywordTrue
DelayModuleLoad.__getattr__(self, name)

Source line 45

ParameterPassing conventionDefault / required
namepositional or keywordrequired
class AiohttpResponse

Source line 255

Allows for requests to be done similar to
requests module w/ aiohttp, with response object being

Construct: AiohttpResponse(r, elapsed, data)

Fields assigned by the constructor: content, elapsed. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

AiohttpResponse.__init__(self, r, elapsed, data)

Source line 260

ParameterPassing conventionDefault / required
rpositional or keywordrequired
elapsedpositional or keywordrequired
datapositional or keywordrequired
AiohttpResponse.raise_for_status(self)

Source line 288

No caller-supplied parameters are declared.

AiohttpResponse.json(self)

Source line 290

Get json content as a dictionary.

No caller-supplied parameters are declared.

AiohttpResponse.text(self)

Source line 294

Decorators: @property

Get content as a string

No caller-supplied parameters are declared.

async AiohttpResponse.get(*args, **kwargs)

Source line 299

Make a GET request via aiohttp.
ParameterPassing conventionDefault / required
argsextra positional arguments (*args)optional collection
kwargsextra keyword arguments (**kwargs)optional collection

Declared with async def. Normal calls return an awaitable, or an async generator if the body yields. Decorated properties may be accessed differently; follow the object guide.

async AiohttpResponse.post(*args, **kwargs)

Source line 309

Make a POST request via aiohttp.
ParameterPassing conventionDefault / required
argsextra positional arguments (*args)optional collection
kwargsextra keyword arguments (**kwargs)optional collection

Declared with async def. Normal calls return an awaitable, or an async generator if the body yields. Decorated properties may be accessed differently; follow the object guide.

async AiohttpResponse.delete(*args, **kwargs)

Source line 319

Make a DELETE request via aiohttp.
ParameterPassing conventionDefault / required
argsextra positional arguments (*args)optional collection
kwargsextra keyword arguments (**kwargs)optional collection

Declared with async def. Normal calls return an awaitable, or an async generator if the body yields. Decorated properties may be accessed differently; follow the object guide.

async AiohttpResponse.ping(*args, **kwargs)

Source line 329

Make a GET request without loading all of page content.
ParameterPassing conventionDefault / required
argsextra positional arguments (*args)optional collection
kwargsextra keyword arguments (**kwargs)optional collection

Declared with async def. Normal calls return an awaitable, or an async generator if the body yields. Decorated properties may be accessed differently; follow the object guide.

async download_file_async(url, dest_path, chunk_size=1024 * 1024, verbose=False, as_gzip=False)

Source line 337

ParameterPassing conventionDefault / required
urlpositional or keywordrequired
dest_pathpositional or keywordrequired
chunk_sizepositional or keyword1024 * 1024
verbosepositional or keywordFalse
as_gzippositional or keywordFalse

Declared with async def. Normal calls return an awaitable, or an async generator if the body yields. Decorated properties may be accessed differently; follow the object guide.

download_file(url, dest_path, chunk_size=1024 * 1024)

Source line 376

ParameterPassing conventionDefault / required
urlpositional or keywordrequired
dest_pathpositional or keywordrequired
chunk_sizepositional or keyword1024 * 1024
dec_amt(n)

Source line 416

ParameterPassing conventionDefault / required
npositional or keywordrequired
format_time_sec(sec)

Source line 429

ParameterPassing conventionDefault / required
secpositional or keywordrequired
format_size(size)

Source line 487

ParameterPassing conventionDefault / required
sizepositional or keywordrequired
format_number(number)

Source line 505

ParameterPassing conventionDefault / required
numberpositional or keywordrequired
format_currency(number)

Source line 524

ParameterPassing conventionDefault / required
numberpositional or keywordrequired
format_name(name)

Source line 528

ParameterPassing conventionDefault / required
namepositional or keywordrequired
class TestManager

Source line 542

Construct: TestManager(**kwargs)

Fields assigned by the constructor: end, start, test_trial, trial_amt, trial_time, trial_type. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

TestManager.__init__(self, **kwargs)

Source line 543

ParameterPassing conventionDefault / required
kwargsextra keyword arguments (**kwargs)optional collection
TestManager.__iter__(self)

Source line 568

No caller-supplied parameters are declared.

TestManager.__next__(self)

Source line 577

No caller-supplied parameters are declared.

TestManager.empty_trial_iter(**kwargs)

Source line 612

ParameterPassing conventionDefault / required
kwargsextra keyword arguments (**kwargs)optional collection
TestManager.empty_trial_run(trial_count)

Source line 617

ParameterPassing conventionDefault / required
trial_countpositional or keywordrequired
TestManager.empty_trial_manual(trial_count)

Source line 624

ParameterPassing conventionDefault / required
trial_countpositional or keywordrequired
TestManager.duration(self)

Source line 633

Decorators: @property

No caller-supplied parameters are declared.

TestManager.duration_str(self)

Source line 641

Decorators: @property

No caller-supplied parameters are declared.

TestManager.avg_duration(self)

Source line 644

Decorators: @property

No caller-supplied parameters are declared.

TestManager.avg_duration_str(self)

Source line 647

Decorators: @property

No caller-supplied parameters are declared.

TestManager.test_func(self, func)

Source line 649

ParameterPassing conventionDefault / required
funcpositional or keywordrequired
TestManager.run(self)

Source line 651

No caller-supplied parameters are declared.

TestManager.start_trial(self)

Source line 663

No caller-supplied parameters are declared.

TestManager.end_trial(self)

Source line 666

No caller-supplied parameters are declared.

TestManager.print_results(self)

Source line 673

No caller-supplied parameters are declared.

TestManager.txt_results(self)

Source line 677

No caller-supplied parameters are declared.

remove_outliers(data)

Source line 683

ParameterPassing conventionDefault / required
datapositional or keywordrequired
get_sd_dev(data)

Source line 731

ParameterPassing conventionDefault / required
datapositional or keywordrequired
get_total(data)

Source line 750

ParameterPassing conventionDefault / required
datapositional or keywordrequired
get_median(data)

Source line 761

ParameterPassing conventionDefault / required
datapositional or keywordrequired
is_even(amt)

Source line 783

ParameterPassing conventionDefault / required
amtpositional or keywordrequired
dir_size(dir_path)

Source line 790

ParameterPassing conventionDefault / required
dir_pathpositional or keywordrequired
class FileInfo

Source line 804

Construct: FileInfo(x)

Fields assigned by the constructor: created_at, is_dir, modified, name, path, size. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

FileInfo.__init__(self, x)

Source line 805

ParameterPassing conventionDefault / required
xpositional or keywordrequired
FileInfo.all_files_recursive(self)

Source line 829

No caller-supplied parameters are declared.

FileInfo.all_files(self)

Source line 843

No caller-supplied parameters are declared.

FileInfo.__str__(self)

Source line 853

No caller-supplied parameters are declared.

FileInfo.__repr__(self)

Source line 855

No caller-supplied parameters are declared.

scan_for_file(file)

Source line 860

ParameterPassing conventionDefault / required
filepositional or keywordrequired
class DataInfo

Source line 866

Construct: DataInfo(data)

Fields assigned by the constructor: data, data_sorted. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

class DataInfo.Item

Source line 867

Construct: DataInfo.Item(n, di)

Fields assigned by the constructor: data_info, frequency, number. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

DataInfo.Item.__init__(self, n, di)

Source line 868

ParameterPassing conventionDefault / required
npositional or keywordrequired
dipositional or keywordrequired
DataInfo.Item.zscore(self)

Source line 876

Decorators: @property

No caller-supplied parameters are declared.

DataInfo.Item.is_outlier(self)

Source line 881

Decorators: @property

No caller-supplied parameters are declared.

DataInfo.Item.percentile(self)

Source line 886

Decorators: @property

No caller-supplied parameters are declared.

DataInfo.Item.load(self)

Source line 890

No caller-supplied parameters are declared.

DataInfo.Item.__repr__(self)

Source line 894

No caller-supplied parameters are declared.

DataInfo.__init__(self, data)

Source line 896

ParameterPassing conventionDefault / required
datapositional or keywordrequired
DataInfo.sorted_data(self)

Source line 910

No caller-supplied parameters are declared.

DataInfo.len(self)

Source line 915

Decorators: @property

No caller-supplied parameters are declared.

DataInfo.total(self)

Source line 920

Decorators: @property

No caller-supplied parameters are declared.

DataInfo.range(self)

Source line 925

Decorators: @property

No caller-supplied parameters are declared.

DataInfo.item_dict(self)

Source line 966

Decorators: @property

No caller-supplied parameters are declared.

DataInfo.mode(self)

Source line 971

Decorators: @property

No caller-supplied parameters are declared.

DataInfo.iqr(self)

Source line 976

Decorators: @property

No caller-supplied parameters are declared.

DataInfo.avg(self)

Source line 981

Decorators: @property

No caller-supplied parameters are declared.

DataInfo.avg_no_outliers(self)

Source line 988

No caller-supplied parameters are declared.

DataInfo.even_len(self)

Source line 998

Decorators: @property

No caller-supplied parameters are declared.

DataInfo.median(self)

Source line 1001

Decorators: @property

No caller-supplied parameters are declared.

DataInfo.skewed(self)

Source line 1006

Decorators: @property

No caller-supplied parameters are declared.

DataInfo.sd_dev(self)

Source line 1015

Decorators: @property

No caller-supplied parameters are declared.

DataInfo.avg_dev(self)

Source line 1024

Decorators: @property

No caller-supplied parameters are declared.

DataInfo.load(self)

Source line 1032

No caller-supplied parameters are declared.

DataInfo.is_outlier(self, n)

Source line 1100

ParameterPassing conventionDefault / required
npositional or keywordrequired
DataInfo.get_zscore(self, n)

Source line 1108

ParameterPassing conventionDefault / required
npositional or keywordrequired
DataInfo.get_item(self, n)

Source line 1110

ParameterPassing conventionDefault / required
npositional or keywordrequired
DataInfo.get_percentile(self, n)

Source line 1113

ParameterPassing conventionDefault / required
npositional or keywordrequired
DataInfo.info_txt(self)

Source line 1146

No caller-supplied parameters are declared.

DataInfo.print(self)

Source line 1164

No caller-supplied parameters are declared.

DataInfo.basic_info_txt(self)

Source line 1168

No caller-supplied parameters are declared.

DataInfo.basic_print(self)

Source line 1178

No caller-supplied parameters are declared.

DataInfo.__len__(self)

Source line 1183

No caller-supplied parameters are declared.

DataInfo.__iter__(self)

Source line 1185

No caller-supplied parameters are declared.

DataInfo.__next__(self)

Source line 1188

No caller-supplied parameters are declared.

class DataInfoMisc

Source line 1192

Construct: DataInfoMisc(data, reverse=False)

Fields assigned by the constructor: data, data_sorted, reverse. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

class DataInfoMisc.Item

Source line 1193

Construct: DataInfoMisc.Item(n, di)

Fields assigned by the constructor: data_info, frequency, value. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

DataInfoMisc.Item.__init__(self, n, di)

Source line 1194

ParameterPassing conventionDefault / required
npositional or keywordrequired
dipositional or keywordrequired
DataInfoMisc.Item.zscore(self)

Source line 1202

Decorators: @property

No caller-supplied parameters are declared.

DataInfoMisc.Item.is_outlier(self)

Source line 1207

Decorators: @property

No caller-supplied parameters are declared.

DataInfoMisc.Item.percentile(self)

Source line 1212

Decorators: @property

No caller-supplied parameters are declared.

DataInfoMisc.Item.load(self)

Source line 1216

No caller-supplied parameters are declared.

DataInfoMisc.Item.__repr__(self)

Source line 1220

No caller-supplied parameters are declared.

DataInfoMisc.__init__(self, data, reverse=False)

Source line 1222

ParameterPassing conventionDefault / required
datapositional or keywordrequired
reversepositional or keywordFalse
DataInfoMisc.sorted_data(self)

Source line 1235

No caller-supplied parameters are declared.

DataInfoMisc.len(self)

Source line 1240

Decorators: @property

No caller-supplied parameters are declared.

DataInfoMisc.total(self)

Source line 1245

Decorators: @property

No caller-supplied parameters are declared.

DataInfoMisc.range(self)

Source line 1250

Decorators: @property

No caller-supplied parameters are declared.

DataInfoMisc.item_dict(self)

Source line 1289

Decorators: @property

No caller-supplied parameters are declared.

DataInfoMisc.mode(self)

Source line 1294

Decorators: @property

No caller-supplied parameters are declared.

DataInfoMisc.iqr(self)

Source line 1299

Decorators: @property

No caller-supplied parameters are declared.

DataInfoMisc.avg(self)

Source line 1304

Decorators: @property

No caller-supplied parameters are declared.

DataInfoMisc.even_len(self)

Source line 1309

Decorators: @property

No caller-supplied parameters are declared.

DataInfoMisc.median(self)

Source line 1312

Decorators: @property

No caller-supplied parameters are declared.

DataInfoMisc.sd_dev(self)

Source line 1317

Decorators: @property

No caller-supplied parameters are declared.

DataInfoMisc.load(self)

Source line 1326

No caller-supplied parameters are declared.

DataInfoMisc.is_outlier(self, n)

Source line 1403

ParameterPassing conventionDefault / required
npositional or keywordrequired
DataInfoMisc.get_zscore(self, n)

Source line 1411

ParameterPassing conventionDefault / required
npositional or keywordrequired
DataInfoMisc.get_item(self, n)

Source line 1413

ParameterPassing conventionDefault / required
npositional or keywordrequired
DataInfoMisc.get_percentile(self, n)

Source line 1416

ParameterPassing conventionDefault / required
npositional or keywordrequired
DataInfoMisc.__len__(self)

Source line 1449

No caller-supplied parameters are declared.

DataInfoMisc.__iter__(self)

Source line 1451

No caller-supplied parameters are declared.

DataInfoMisc.__next__(self)

Source line 1454

No caller-supplied parameters are declared.

iter_dict(d)

Source line 1457

ParameterPassing conventionDefault / required
dpositional or keywordrequired
sort_dict(d, key=None, reverse=False)

Source line 1462

ParameterPassing conventionDefault / required
dpositional or keywordrequired
keypositional or keywordNone
reversepositional or keywordFalse
class Table

Source line 1480

Construct: Table(format_numbers=False, totals=False)

Fields assigned by the constructor: col_amt, columns, format_int, row_amt, rows, totals. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

Table.row(txt, rl=8)

Source line 1481

ParameterPassing conventionDefault / required
txtpositional or keywordrequired
rlpositional or keyword8
Table.numbFormat(number)

Source line 1491

ParameterPassing conventionDefault / required
numberpositional or keywordrequired
Table.formattedToNumb(number)

Source line 1497

ParameterPassing conventionDefault / required
numberpositional or keywordrequired
Table.__init__(self, format_numbers=False, totals=False)

Source line 1499

ParameterPassing conventionDefault / required
format_numberspositional or keywordFalse
totalspositional or keywordFalse
Table.add_column(self, name, length=None)

Source line 1506

ParameterPassing conventionDefault / required
namepositional or keywordrequired
lengthpositional or keywordNone
Table.add_row(self, *args)

Source line 1511

ParameterPassing conventionDefault / required
argsextra positional arguments (*args)optional collection
Table.print(self, limit=None, send=True)

Source line 1518

ParameterPassing conventionDefault / required
limitpositional or keywordNone
sendpositional or keywordTrue
class Column

Source line 1549

Construct: Column(name, length, table, col_num)

Fields assigned by the constructor: col_num, length, name, table. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

Column.__init__(self, name, length, table, col_num)

Source line 1550

ParameterPassing conventionDefault / required
namepositional or keywordrequired
lengthpositional or keywordrequired
tablepositional or keywordrequired
col_numpositional or keywordrequired
Column.__len__(self)

Source line 1555

No caller-supplied parameters are declared.

Column.__repr__(self)

Source line 1568

No caller-supplied parameters are declared.

Column.total(self)

Source line 1570

No caller-supplied parameters are declared.

class Row

Source line 1595

Construct: Row(row_number, format_numbs, *args)

Fields assigned by the constructor: data, format_numbs, row_num. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

Row.__init__(self, row_number, format_numbs, *args)

Source line 1596

ParameterPassing conventionDefault / required
row_numberpositional or keywordrequired
format_numbspositional or keywordrequired
argsextra positional arguments (*args)optional collection
class Cell

Source line 1605

Construct: Cell(value, col_num, row_num, format_numbs)

Fields assigned by the constructor: col_num, format_numbs, row_num, type, value. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

Cell.__init__(self, value, col_num, row_num, format_numbs)

Source line 1606

ParameterPassing conventionDefault / required
valuepositional or keywordrequired
col_numpositional or keywordrequired
row_numpositional or keywordrequired
format_numbspositional or keywordrequired
Cell.__len__(self)

Source line 1622

No caller-supplied parameters are declared.

Cell.__str__(self)

Source line 1624

No caller-supplied parameters are declared.

Cell.__repr__(self)

Source line 1629

No caller-supplied parameters are declared.

to_numb(s)

Source line 1637

ParameterPassing conventionDefault / required
spositional or keywordrequired
class TxtTable

Source line 1655

Construct: TxtTable(format_numbers=False, totals=False, len_limit=100)

Fields assigned by the constructor: col_amt, columns, format_int, len_limit, row_amt, rows, totals. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

TxtTable.row(txt, rl=8)

Source line 1656

ParameterPassing conventionDefault / required
txtpositional or keywordrequired
rlpositional or keyword8
TxtTable.numbFormat(number)

Source line 1666

ParameterPassing conventionDefault / required
numberpositional or keywordrequired
TxtTable.formattedToNumb(number)

Source line 1675

ParameterPassing conventionDefault / required
numberpositional or keywordrequired
TxtTable.__init__(self, format_numbers=False, totals=False, len_limit=100)

Source line 1677

ParameterPassing conventionDefault / required
format_numberspositional or keywordFalse
totalspositional or keywordFalse
len_limitpositional or keyword100
TxtTable.add_column(self, name, length=None, str_convert=None, value=None)

Source line 1685

ParameterPassing conventionDefault / required
namepositional or keywordrequired
lengthpositional or keywordNone
str_convertpositional or keywordNone
valuepositional or keywordNone
TxtTable.insert_column(self, name, loc, length=None, str_convert=None, value=None)

Source line 1702

ParameterPassing conventionDefault / required
namepositional or keywordrequired
locpositional or keywordrequired
lengthpositional or keywordNone
str_convertpositional or keywordNone
valuepositional or keywordNone
TxtTable.add_row(self, *args)

Source line 1729

ParameterPassing conventionDefault / required
argsextra positional arguments (*args)optional collection
TxtTable.remove_column(self, col_num)

Source line 1737

ParameterPassing conventionDefault / required
col_numpositional or keywordrequired
TxtTable.print(self, limit=None, send=True)

Source line 1748

ParameterPassing conventionDefault / required
limitpositional or keywordNone
sendpositional or keywordTrue
TxtTable.to_html(self, max_len=100, condensed=True, row_range=None, to_body_top='', to_body_bottom='', to_head='', own_rows=None, table_only=False, row_colors=[['#f0eceb', '#000000'], ['#e6e2e1', '#000000']], background_color='#f7f2f2', header_color='#000000', table_border='1px solid black')

Source line 1788

ParameterPassing conventionDefault / required
max_lenpositional or keyword100
condensedpositional or keywordTrue
row_rangepositional or keywordNone
to_body_toppositional or keyword''
to_body_bottompositional or keyword''
to_headpositional or keyword''
own_rowspositional or keywordNone
table_onlypositional or keywordFalse
row_colorspositional or keyword[['#f0eceb', '#000000'], ['#e6e2e1', '#000000']]
background_colorpositional or keyword'#f7f2f2'
header_colorpositional or keyword'#000000'
table_borderpositional or keyword'1px solid black'
TxtTable.flask_pagination(self, request, per_page=50, max_len=100, page_colors=['#ffffff', '#000000'], to_body_top='', querystring='', search_ignore=None, custom_sort={}, **kwargs)

Source line 1942

ParameterPassing conventionDefault / required
requestpositional or keywordrequired
per_pagepositional or keyword50
max_lenpositional or keyword100
page_colorspositional or keyword['#ffffff', '#000000']
to_body_toppositional or keyword''
querystringpositional or keyword''
search_ignorepositional or keywordNone
custom_sortpositional or keyword{}
kwargsextra keyword arguments (**kwargs)optional collection
TxtTable.to_csv(self)

Source line 2303

No caller-supplied parameters are declared.

TxtTable.__repr__(self)

Source line 2338

No caller-supplied parameters are declared.

class TxtTable.Column

Source line 2341

Construct: TxtTable.Column(name, length, table, col_num, str_convert=None)

Fields assigned by the constructor: col_num, length, name, str_convert, table. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

TxtTable.Column.__init__(self, name, length, table, col_num, str_convert=None)

Source line 2342

ParameterPassing conventionDefault / required
namepositional or keywordrequired
lengthpositional or keywordrequired
tablepositional or keywordrequired
col_numpositional or keywordrequired
str_convertpositional or keywordNone
TxtTable.Column.__len__(self)

Source line 2348

No caller-supplied parameters are declared.

TxtTable.Column.rows_len(self, rows)

Source line 2365

ParameterPassing conventionDefault / required
rowspositional or keywordrequired
TxtTable.Column.__repr__(self)

Source line 2382

No caller-supplied parameters are declared.

TxtTable.Column.total(self)

Source line 2384

No caller-supplied parameters are declared.

TxtTable.Column.is_numb(self)

Source line 2408

No caller-supplied parameters are declared.

TxtTable.Column.is_datetime(self)

Source line 2414

No caller-supplied parameters are declared.

TxtTable.Column.cells(self)

Source line 2420

No caller-supplied parameters are declared.

class TxtTable.Row

Source line 2430

Construct: TxtTable.Row(row_number, format_numbs, table, *args)

Fields assigned by the constructor: data, format_numbs, row_num, table. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

TxtTable.Row.__init__(self, row_number, format_numbs, table, *args)

Source line 2431

ParameterPassing conventionDefault / required
row_numberpositional or keywordrequired
format_numbspositional or keywordrequired
tablepositional or keywordrequired
argsextra positional arguments (*args)optional collection
TxtTable.Row.remove_column(self, col_num)

Source line 2445

ParameterPassing conventionDefault / required
col_numpositional or keywordrequired
TxtTable.Row.__repr__(self)

Source line 2455

No caller-supplied parameters are declared.

TxtTable.Row.__eq__(self, other)

Source line 2457

ParameterPassing conventionDefault / required
otherpositional or keywordrequired
TxtTable.Row.__contains__(self, other)

Source line 2461

ParameterPassing conventionDefault / required
otherpositional or keywordrequired
TxtTable.Row.__len__(self)

Source line 2463

No caller-supplied parameters are declared.

TxtTable.Row.__iter__(self)

Source line 2465

No caller-supplied parameters are declared.

TxtTable.Row.__next__(self)

Source line 2468

No caller-supplied parameters are declared.

TxtTable.Row.__getitem__(self, item)

Source line 2470

ParameterPassing conventionDefault / required
itempositional or keywordrequired
class TxtTable.Cell

Source line 2490

Construct: TxtTable.Cell(value, print_value, col_num, row_num, format_numbs)

Fields assigned by the constructor: col_num, format_numbs, print_value, row_num, type, value. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

TxtTable.Cell.__init__(self, value, print_value, col_num, row_num, format_numbs)

Source line 2491

ParameterPassing conventionDefault / required
valuepositional or keywordrequired
print_valuepositional or keywordrequired
col_numpositional or keywordrequired
row_numpositional or keywordrequired
format_numbspositional or keywordrequired
TxtTable.Cell.__len__(self)

Source line 2508

No caller-supplied parameters are declared.

TxtTable.Cell.__str__(self)

Source line 2510

No caller-supplied parameters are declared.

TxtTable.Cell.__contains__(self, other)

Source line 2516

ParameterPassing conventionDefault / required
otherpositional or keywordrequired
TxtTable.Cell.__eq__(self, other)

Source line 2518

ParameterPassing conventionDefault / required
otherpositional or keywordrequired
TxtTable.Cell.__repr__(self)

Source line 2520

No caller-supplied parameters are declared.

TxtTable.to_numb(s)

Source line 2525

ParameterPassing conventionDefault / required
spositional or keywordrequired
place_suffix(n)

Source line 2543

ParameterPassing conventionDefault / required
npositional or keywordrequired
peyton_day_timestamp(dt=None)

Source line 2558

ParameterPassing conventionDefault / required
dtpositional or keywordNone
base10_to_base36(n)

Source line 2569

ParameterPassing conventionDefault / required
npositional or keywordrequired
base10_to_base62(n)

Source line 2580

ParameterPassing conventionDefault / required
npositional or keywordrequired
peyton_id_prefix(dt=None, leading_zeros=True)

Source line 2593

ParameterPassing conventionDefault / required
dtpositional or keywordNone
leading_zerospositional or keywordTrue
peyton_id_prefix_to_timestamp(prefix)

Source line 2603

ParameterPassing conventionDefault / required
prefixpositional or keywordrequired
peyton_id(dt=None, length=16)

Source line 2615

ParameterPassing conventionDefault / required
dtpositional or keywordNone
lengthpositional or keyword16
peyton_id_secure(dt=None, length=16)

Source line 2619

ParameterPassing conventionDefault / required
dtpositional or keywordNone
lengthpositional or keyword16
class RandomString

Source line 2624

No constructor is declared here. Some utility classes group functions for direct class access; use the call style shown in the guide.

Declared functions, properties, and nested objects:

RandomString.get(size)

Source line 2630

ParameterPassing conventionDefault / required
sizepositional or keywordrequired
RandomString.get_alpha(size)

Source line 2635

ParameterPassing conventionDefault / required
sizepositional or keywordrequired
RandomString.get_num(size)

Source line 2640

ParameterPassing conventionDefault / required
sizepositional or keywordrequired
RandomString.get_alphanum(size)

Source line 2645

ParameterPassing conventionDefault / required
sizepositional or keywordrequired
RandomString.secure_get(size)

Source line 2650

ParameterPassing conventionDefault / required
sizepositional or keywordrequired
RandomString.secure_get_alpha(size)

Source line 2655

ParameterPassing conventionDefault / required
sizepositional or keywordrequired
RandomString.secure_get_num(size)

Source line 2660

ParameterPassing conventionDefault / required
sizepositional or keywordrequired
RandomString.secure_get_alphanum(size)

Source line 2665

ParameterPassing conventionDefault / required
sizepositional or keywordrequired
get_all_between(txt, start, end)

Source line 2704

ParameterPassing conventionDefault / required
txtpositional or keywordrequired
startpositional or keywordrequired
endpositional or keywordrequired
get_between(txt, start, end)

Source line 2710

ParameterPassing conventionDefault / required
txtpositional or keywordrequired
startpositional or keywordrequired
endpositional or keywordrequired
bytes_to_str(b)

Source line 2717

ParameterPassing conventionDefault / required
bpositional or keywordrequired
file_arg_to_str(arg)

Source line 2738

ParameterPassing conventionDefault / required
argpositional or keywordrequired
file_arg_to_buffer(arg, mode='wb', must_exist=True)

Source line 2772

ParameterPassing conventionDefault / required
argpositional or keywordrequired
modepositional or keyword'wb'
must_existpositional or keywordTrue
file_arg_to_file(arg, mode='r')

Source line 2789

ParameterPassing conventionDefault / required
argpositional or keywordrequired
modepositional or keyword'r'
file_arg_to_fp(arg)

Source line 2802

ParameterPassing conventionDefault / required
argpositional or keywordrequired
extract_int(s)

Source line 2810

ParameterPassing conventionDefault / required
spositional or keywordrequired
class merge_iters

Source line 2821

Construct: merge_iters(*args)

Declared functions, properties, and nested objects:

merge_iters.__init__(self, *args)

Source line 2823

ParameterPassing conventionDefault / required
argsextra positional arguments (*args)optional collection
merge_iters.__iter__(self)

Source line 2828

No caller-supplied parameters are declared.

merge_iters.__next__(self)

Source line 2832

No caller-supplied parameters are declared.

class CSVReader

Source line 2842

No constructor is declared here. Some utility classes group functions for direct class access; use the call style shown in the guide.

Declared functions, properties, and nested objects:

class CSVReader.CharsAfterQuoted(Exception)

Source line 2843

Construct: CSVReader.CharsAfterQuoted(line_number, char_on_line, char, rows_found)

Declared functions, properties, and nested objects:

CSVReader.CharsAfterQuoted.__init__(self, line_number, char_on_line, char, rows_found)

Source line 2844

ParameterPassing conventionDefault / required
line_numberpositional or keywordrequired
char_on_linepositional or keywordrequired
charpositional or keywordrequired
rows_foundpositional or keywordrequired
class CSVReader.RowCountMismatch(Exception)

Source line 2847

Construct: CSVReader.RowCountMismatch(line_number, amt, expected)

Declared functions, properties, and nested objects:

CSVReader.RowCountMismatch.__init__(self, line_number, amt, expected)

Source line 2848

ParameterPassing conventionDefault / required
line_numberpositional or keywordrequired
amtpositional or keywordrequired
expectedpositional or keywordrequired
CSVReader.condense(fp, has_headers=True, unique_only=False, remove_func=None, remove_columns=[])

Source line 2851

ParameterPassing conventionDefault / required
fppositional or keywordrequired
has_headerspositional or keywordTrue
unique_onlypositional or keywordFalse
remove_funcpositional or keywordNone
remove_columnspositional or keyword[]
CSVReader.write(rows)

Source line 2899

ParameterPassing conventionDefault / required
rowspositional or keywordrequired
CSVReader.write_file(fp, rows)

Source line 2921

ParameterPassing conventionDefault / required
fppositional or keywordrequired
rowspositional or keywordrequired
CSVReader.read(arg, has_headers=True, as_list=False)

Source line 2927

ParameterPassing conventionDefault / required
argpositional or keywordrequired
has_headerspositional or keywordTrue
as_listpositional or keywordFalse
async CSVReader.basic_read_threaded(arg, amt_per_thread=20000, has_headers=True, as_list=False, max_workers=None)

Source line 3152

ParameterPassing conventionDefault / required
argpositional or keywordrequired
amt_per_threadpositional or keyword20000
has_headerspositional or keywordTrue
as_listpositional or keywordFalse
max_workerspositional or keywordNone

Declared with async def. Normal calls return an awaitable, or an async generator if the body yields. Decorated properties may be accessed differently; follow the object guide.

CSVReader.basic_read(arg, has_headers=True, as_list=False, forgiving=False, by_line=None)

Source line 3234

ParameterPassing conventionDefault / required
argpositional or keywordrequired
has_headerspositional or keywordTrue
as_listpositional or keywordFalse
forgivingpositional or keywordFalse
by_linepositional or keywordNone
CSVReader.no_quotes_read(arg, has_headers=True, as_list=False)

Source line 3335

ParameterPassing conventionDefault / required
argpositional or keywordrequired
has_headerspositional or keywordTrue
as_listpositional or keywordFalse
class ListTable

Source line 3400

Construct: ListTable(rows, has_headers=True, read_only=True)

Fields assigned by the constructor: has_headers, headers, read_only, rows. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

ListTable.__init__(self, rows, has_headers=True, read_only=True)

Source line 3401

ParameterPassing conventionDefault / required
rowspositional or keywordrequired
has_headerspositional or keywordTrue
read_onlypositional or keywordTrue
ListTable.dict(self)

Source line 3430

No caller-supplied parameters are declared.

ListTable.__del__(self)

Source line 3437

No caller-supplied parameters are declared.

ListTable.__getitem__(self, key)

Source line 3445

ParameterPassing conventionDefault / required
keypositional or keywordrequired
ListTable.__len__(self)

Source line 3449

No caller-supplied parameters are declared.

ListTable.__iter__(self)

Source line 3451

No caller-supplied parameters are declared.

ListTable.__next__(self)

Source line 3454

No caller-supplied parameters are declared.

ListTable.__repr__(self)

Source line 3456

No caller-supplied parameters are declared.

class ListTable.Row

Source line 3458

Construct: ListTable.Row(row, table)

Fields assigned by the constructor: row, table. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

ListTable.Row.__init__(self, row, table)

Source line 3459

ParameterPassing conventionDefault / required
rowpositional or keywordrequired
tablepositional or keywordrequired
ListTable.Row.dict(self)

Source line 3462

No caller-supplied parameters are declared.

ListTable.Row.__getitem__(self, key)

Source line 3469

ParameterPassing conventionDefault / required
keypositional or keywordrequired
ListTable.Row.__eq__(self, other)

Source line 3478

ParameterPassing conventionDefault / required
otherpositional or keywordrequired
ListTable.Row.__len__(self)

Source line 3484

No caller-supplied parameters are declared.

ListTable.Row.__iter__(self)

Source line 3486

No caller-supplied parameters are declared.

ListTable.Row.__next__(self)

Source line 3489

No caller-supplied parameters are declared.

ListTable.Row.__repr__(self)

Source line 3491

No caller-supplied parameters are declared.

class AsyncProperty

Source line 3496

Construct: AsyncProperty(func)

Fields assigned by the constructor: coro, func. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

AsyncProperty.__init__(self, func)

Source line 3497

ParameterPassing conventionDefault / required
funcpositional or keywordrequired
AsyncProperty.__await__(self)

Source line 3501

No caller-supplied parameters are declared.

AsyncProperty.__get__(self, instance, owner)

Source line 3503

ParameterPassing conventionDefault / required
instancepositional or keywordrequired
ownerpositional or keywordrequired
AsyncProperty.__set__(self, instance, value)

Source line 3506

ParameterPassing conventionDefault / required
instancepositional or keywordrequired
valuepositional or keywordrequired
AsyncProperty.setter(self, func)

Source line 3508

ParameterPassing conventionDefault / required
funcpositional or keywordrequired
class CachedProperty

Source line 3512

Construct: CachedProperty(func=None, expire=None)

Fields assigned by the constructor: func, is_coro, name, set_func. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

CachedProperty.__init__(self, func=None, expire=None)

Source line 3513

ParameterPassing conventionDefault / required
funcpositional or keywordNone
expirepositional or keywordNone
CachedProperty.setter(self, func)

Source line 3529

ParameterPassing conventionDefault / required
funcpositional or keywordrequired
CachedProperty.expire(self)

Source line 3533

Decorators: @property

No caller-supplied parameters are declared.

CachedProperty.expire(self, expire)

Source line 3536

Decorators: @expire.setter

ParameterPassing conventionDefault / required
expirepositional or keywordrequired
CachedProperty.get_cached(self, instance)

Source line 3545

ParameterPassing conventionDefault / required
instancepositional or keywordrequired
CachedProperty.is_cached(self, instance)

Source line 3549

ParameterPassing conventionDefault / required
instancepositional or keywordrequired
CachedProperty.__get__(self, instance, owner)

Source line 3553

ParameterPassing conventionDefault / required
instancepositional or keywordrequired
ownerpositional or keywordrequired
CachedProperty.__set__(self, instance, value)

Source line 3606

ParameterPassing conventionDefault / required
instancepositional or keywordrequired
valuepositional or keywordrequired
CachedProperty.__call__(self, func)

Source line 3617

ParameterPassing conventionDefault / required
funcpositional or keywordrequired
CachedProperty.__repr__(self)

Source line 3625

No caller-supplied parameters are declared.

class ClassProperty

Source line 3629

Construct: ClassProperty(func)

Fields assigned by the constructor: func, name, set_func. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

ClassProperty.__init__(self, func)

Source line 3630

ParameterPassing conventionDefault / required
funcpositional or keywordrequired
ClassProperty.__get__(self, instance, owner)

Source line 3634

ParameterPassing conventionDefault / required
instancepositional or keywordrequired
ownerpositional or keywordrequired
ClassProperty.__set__(self, instance, value)

Source line 3636

ParameterPassing conventionDefault / required
instancepositional or keywordrequired
valuepositional or keywordrequired
ClassProperty.__call__(self, func)

Source line 3638

ParameterPassing conventionDefault / required
funcpositional or keywordrequired
ClassProperty.setter(self, func)

Source line 3644

ParameterPassing conventionDefault / required
funcpositional or keywordrequired
class CachedClassProperty

Source line 3648

Construct: CachedClassProperty(func=None, expire=None)

Fields assigned by the constructor: func, is_coro, name. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

CachedClassProperty.__init__(self, func=None, expire=None)

Source line 3649

ParameterPassing conventionDefault / required
funcpositional or keywordNone
expirepositional or keywordNone
CachedClassProperty.expire(self)

Source line 3665

Decorators: @property

No caller-supplied parameters are declared.

CachedClassProperty.expire(self, expire)

Source line 3668

Decorators: @expire.setter

ParameterPassing conventionDefault / required
expirepositional or keywordrequired
CachedClassProperty.get_cached(self, instance)

Source line 3677

ParameterPassing conventionDefault / required
instancepositional or keywordrequired
CachedClassProperty.__get__(self, instance, owner)

Source line 3680

ParameterPassing conventionDefault / required
instancepositional or keywordrequired
ownerpositional or keywordrequired
CachedClassProperty.__call__(self, func)

Source line 3713

ParameterPassing conventionDefault / required
funcpositional or keywordrequired
CachedClassProperty.__repr__(self)

Source line 3721

No caller-supplied parameters are declared.

class StringInfo

Source line 3725

Construct: StringInfo(s)

Fields assigned by the constructor: alpha_count, char_array, digit_count, is_float, is_int, lower_count, most_common, most_common_count, str, upper_count, word_array, word_list. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

StringInfo.indexes(l, v)

Source line 3731

ParameterPassing conventionDefault / required
lpositional or keywordrequired
vpositional or keywordrequired
StringInfo.__getattr__(self, name)

Source line 3739

ParameterPassing conventionDefault / required
namepositional or keywordrequired
StringInfo.__init__(self, s)

Source line 3741

ParameterPassing conventionDefault / required
spositional or keywordrequired
StringInfo.__len__(self)

Source line 3797

No caller-supplied parameters are declared.

StringInfo.lower(self)

Source line 3799

No caller-supplied parameters are declared.

StringInfo.char_count(self, c)

Source line 3801

ParameterPassing conventionDefault / required
cpositional or keywordrequired
StringInfo.avg_word_len(self)

Source line 3805

No caller-supplied parameters are declared.

StringInfo.check(self, *args)

Source line 3813

ParameterPassing conventionDefault / required
argsextra positional arguments (*args)optional collection
StringInfo.check_alt(self, i)

Source line 3828

ParameterPassing conventionDefault / required
ipositional or keywordrequired
StringInfo.regex_links(self)

Source line 3841

No caller-supplied parameters are declared.

StringInfo.links(self)

Source line 3843

No caller-supplied parameters are declared.

class LinkInfo

Source line 3847

Construct: LinkInfo(url)

Fields assigned by the constructor: domain_name, fragment, hostname, path, port, qs, qs_raw, scheme, sld, subdomains, text_url, tld, url. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

LinkInfo.qs_parse(qs)

Source line 3849

ParameterPassing conventionDefault / required
qspositional or keywordrequired
LinkInfo.base_url(self)

Source line 3868

Decorators: @property

No caller-supplied parameters are declared.

LinkInfo.__init__(self, url)

Source line 3878

ParameterPassing conventionDefault / required
urlpositional or keywordrequired
LinkInfo.hash(self)

Source line 3947

Decorators: @CachedProperty

No caller-supplied parameters are declared.

LinkInfo.__str__(self)

Source line 3955

No caller-supplied parameters are declared.

LinkInfo.__len__(self)

Source line 3957

No caller-supplied parameters are declared.

LinkInfo.__eq__(self, other)

Source line 3959

ParameterPassing conventionDefault / required
otherpositional or keywordrequired
LinkInfo.__repr__(self)

Source line 3965

No caller-supplied parameters are declared.

LinkInfo.regex_find(string)

Source line 3968

ParameterPassing conventionDefault / required
stringpositional or keywordrequired
LinkInfo.find(string)

Source line 3975

ParameterPassing conventionDefault / required
stringpositional or keywordrequired
class ZF_REQ

Source line 4058

No constructor is declared here. Some utility classes group functions for direct class access; use the call style shown in the guide.

Declared functions, properties, and nested objects:

class ZF_REQ._data

Source line 4059

Construct: ZF_REQ._data(b, r)

Fields assigned by the constructor: compress_sizes, content, encoding, ratio, request. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

ZF_REQ._data.__init__(self, b, r)

Source line 4060

ParameterPassing conventionDefault / required
bpositional or keywordrequired
rpositional or keywordrequired
ZF_REQ._data.json(self)

Source line 4066

No caller-supplied parameters are declared.

ZF_REQ._data.text(self)

Source line 4069

Decorators: @property

No caller-supplied parameters are declared.

ZF_REQ._data.__getattr__(self, name)

Source line 4071

ParameterPassing conventionDefault / required
namepositional or keywordrequired
ZF_REQ._data.__repr__(self)

Source line 4073

No caller-supplied parameters are declared.

ZF_REQ.request(url, params=None, headers=None, timeout=600)

Source line 4078

ParameterPassing conventionDefault / required
urlpositional or keywordrequired
paramspositional or keywordNone
headerspositional or keywordNone
timeoutpositional or keyword600
ZF_REQ.download(fp, url, *args, **kwargs)

Source line 4099

ParameterPassing conventionDefault / required
fppositional or keywordrequired
urlpositional or keywordrequired
argsextra positional arguments (*args)optional collection
kwargsextra keyword arguments (**kwargs)optional collection
randomize_list(l)

Source line 4122

ParameterPassing conventionDefault / required
lpositional or keywordrequired
class IterLoop

Source line 4130

Construct: IterLoop(i)

Fields assigned by the constructor: l. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

IterLoop.__init__(self, i)

Source line 4131

ParameterPassing conventionDefault / required
ipositional or keywordrequired
IterLoop.next(self)

Source line 4136

No caller-supplied parameters are declared.

IterLoop.__contains__(self, item)

Source line 4138

ParameterPassing conventionDefault / required
itempositional or keywordrequired
IterLoop.__len__(self)

Source line 4140

No caller-supplied parameters are declared.

IterLoop.__iter__(self)

Source line 4142

No caller-supplied parameters are declared.

IterLoop.__next__(self)

Source line 4145

No caller-supplied parameters are declared.

class CountryInfo

Source line 4188

Construct: CountryInfo(key=None, compressed_requests=False)

Fields assigned by the constructor: compressed_requests, key. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

CountryInfo.__init__(self, key=None, compressed_requests=False)

Source line 4189

ParameterPassing conventionDefault / required
keypositional or keywordNone
compressed_requestspositional or keywordFalse
CountryInfo.request(self, url, **kwargs)

Source line 4192

ParameterPassing conventionDefault / required
urlpositional or keywordrequired
kwargsextra keyword arguments (**kwargs)optional collection
CountryInfo.countries(self)

Source line 4212

Decorators: @CachedProperty

No caller-supplied parameters are declared.

class IpInfo

Source line 4224

Construct: IpInfo(ip=None, data=None)

Fields assigned by the constructor: asn, city, country, hostname, ip, location, org, postal, raw_org, region. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

IpInfo.ip_list(cls)

Source line 4235

Decorators: @ClassProperty

No caller-supplied parameters are declared.

IpInfo.get_ip(ip=None)

Source line 4399

ParameterPassing conventionDefault / required
ippositional or keywordNone
IpInfo.is_ipv4(ip)

Source line 4423

ParameterPassing conventionDefault / required
ippositional or keywordrequired
IpInfo.is_ipv6(ip)

Source line 4448

ParameterPassing conventionDefault / required
ippositional or keywordrequired
IpInfo.__repr__(self)

Source line 4458

No caller-supplied parameters are declared.

IpInfo.__init__(self, ip=None, data=None)

Source line 4460

ParameterPassing conventionDefault / required
ippositional or keywordNone
datapositional or keywordNone
IpInfo.dict(self)

Source line 4505

No caller-supplied parameters are declared.

IpInfo.__hash__(self)

Source line 4517

No caller-supplied parameters are declared.

IpInfo.fqdn(self)

Source line 4522

No caller-supplied parameters are declared.

IpInfo.__eq__(self, other)

Source line 4524

ParameterPassing conventionDefault / required
otherpositional or keywordrequired
class AsyncIpInfo

Source line 4536

Construct: AsyncIpInfo(ip=None, data=None)

Fields assigned by the constructor: asn, city, country, hostname, ip, loaded, location, org, postal, raw_org, region, timestamp. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

AsyncIpInfo.ip_list(cls)

Source line 4547

Decorators: @ClassProperty

No caller-supplied parameters are declared.

async AsyncIpInfo.get_ip(ip=None)

Source line 4772

ParameterPassing conventionDefault / required
ippositional or keywordNone

Declared with async def. Normal calls return an awaitable, or an async generator if the body yields. Decorated properties may be accessed differently; follow the object guide.

AsyncIpInfo.is_ipv4(ip)

Source line 4797

ParameterPassing conventionDefault / required
ippositional or keywordrequired
AsyncIpInfo.is_ipv6(ip)

Source line 4822

ParameterPassing conventionDefault / required
ippositional or keywordrequired
AsyncIpInfo.__repr__(self)

Source line 4832

No caller-supplied parameters are declared.

AsyncIpInfo.__init__(self, ip=None, data=None)

Source line 4834

ParameterPassing conventionDefault / required
ippositional or keywordNone
datapositional or keywordNone
AsyncIpInfo.__await__(self)

Source line 4893

No caller-supplied parameters are declared.

AsyncIpInfo.dict(self)

Source line 4895

No caller-supplied parameters are declared.

AsyncIpInfo.__hash__(self)

Source line 4908

No caller-supplied parameters are declared.

AsyncIpInfo.fqdn(self)

Source line 4913

No caller-supplied parameters are declared.

AsyncIpInfo.__eq__(self, other)

Source line 4915

ParameterPassing conventionDefault / required
otherpositional or keywordrequired
quick_save(fp, data, *args, **kwargs)

Source line 4931

ParameterPassing conventionDefault / required
fppositional or keywordrequired
datapositional or keywordrequired
argsextra positional arguments (*args)optional collection
kwargsextra keyword arguments (**kwargs)optional collection
obj_attr_print(obj, no_methods=True, no_class_attrs=False, show_type=False, ignore=[])

Source line 4942

ParameterPassing conventionDefault / required
objpositional or keywordrequired
no_methodspositional or keywordTrue
no_class_attrspositional or keywordFalse
show_typepositional or keywordFalse
ignorepositional or keyword[]
obj_attr_txt(obj, no_methods=True, no_class_attrs=False, show_type=False, ignore=[])

Source line 4958

ParameterPassing conventionDefault / required
objpositional or keywordrequired
no_methodspositional or keywordTrue
no_class_attrspositional or keywordFalse
show_typepositional or keywordFalse
ignorepositional or keyword[]
class BivariateData

Source line 4978

Construct: BivariateData(data)

Fields assigned by the constructor: data, data_points, x, x_info, y, y_info. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

class BivariateData.DataPoint

Source line 4979

Construct: BivariateData.DataPoint(x, y, bd)

Fields assigned by the constructor: bd, x, y. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

BivariateData.DataPoint.__init__(self, x, y, bd)

Source line 4980

ParameterPassing conventionDefault / required
xpositional or keywordrequired
ypositional or keywordrequired
bdpositional or keywordrequired
BivariateData.DataPoint.residual(self)

Source line 4985

Decorators: @CachedProperty

No caller-supplied parameters are declared.

BivariateData.__init__(self, data)

Source line 4988

ParameterPassing conventionDefault / required
datapositional or keywordrequired
BivariateData.slope(self)

Source line 5001

Decorators: @CachedProperty

No caller-supplied parameters are declared.

BivariateData.correlation(self)

Source line 5006

Decorators: @CachedProperty

No caller-supplied parameters are declared.

BivariateData.plot(self, format='png', show_slope=True, show_residual_lines=False)

Source line 5046

ParameterPassing conventionDefault / required
formatpositional or keyword'png'
show_slopepositional or keywordTrue
show_residual_linespositional or keywordFalse
BivariateData.plot_residuals(self, format='png', show_line=True)

Source line 5052

ParameterPassing conventionDefault / required
formatpositional or keyword'png'
show_linepositional or keywordTrue
BivariateData.show(self, show_slope=True, show_residual_lines=False)

Source line 5058

ParameterPassing conventionDefault / required
show_slopepositional or keywordTrue
show_residual_linespositional or keywordFalse
BivariateData.show_residuals(self, show_line=True)

Source line 5061

ParameterPassing conventionDefault / required
show_linepositional or keywordTrue
class Slope

Source line 5065

Construct: Slope(slope, yint)

Fields assigned by the constructor: slope, yint. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

Slope.__init__(self, slope, yint)

Source line 5066

ParameterPassing conventionDefault / required
slopepositional or keywordrequired
yintpositional or keywordrequired
Slope.__str__(self)

Source line 5069

No caller-supplied parameters are declared.

Slope.__call__(self, x=None, y=None)

Source line 5074

ParameterPassing conventionDefault / required
xpositional or keywordNone
ypositional or keywordNone
class CacheList

Source line 5081

Construct: CacheList(max_cache_size=100)

Fields assigned by the constructor: idx, max_cache_size, queue, stringify. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

CacheList.__init__(self, max_cache_size=100)

Source line 5082

ParameterPassing conventionDefault / required
max_cache_sizepositional or keyword100
CacheList.stringify_func(self, func)

Source line 5089

ParameterPassing conventionDefault / required
funcpositional or keywordrequired
CacheList.append(self, item)

Source line 5094

ParameterPassing conventionDefault / required
itempositional or keywordrequired
CacheList.add(self, item)

Source line 5107

ParameterPassing conventionDefault / required
itempositional or keywordrequired
CacheList.remove(self, item)

Source line 5109

ParameterPassing conventionDefault / required
itempositional or keywordrequired
CacheList.pop(self, index=-1)

Source line 5114

ParameterPassing conventionDefault / required
indexpositional or keyword-1
CacheList.get(self, key, default=None)

Source line 5120

ParameterPassing conventionDefault / required
keypositional or keywordrequired
defaultpositional or keywordNone
CacheList.__len__(self)

Source line 5125

No caller-supplied parameters are declared.

CacheList.__getitem__(self, key)

Source line 5127

ParameterPassing conventionDefault / required
keypositional or keywordrequired
CacheList.__iter__(self)

Source line 5129

No caller-supplied parameters are declared.

CacheList.__contains__(self, value)

Source line 5131

ParameterPassing conventionDefault / required
valuepositional or keywordrequired
class Unique

Source line 5136

Construct: Unique(max_items=None)

Fields assigned by the constructor: max_items, v. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

Unique.__init__(self, max_items=None)

Source line 5137

ParameterPassing conventionDefault / required
max_itemspositional or keywordNone
Unique.append(self, item)

Source line 5142

ParameterPassing conventionDefault / required
itempositional or keywordrequired
Unique.remove(self, item)

Source line 5144

ParameterPassing conventionDefault / required
itempositional or keywordrequired
Unique.pop(self, index=-1)

Source line 5147

ParameterPassing conventionDefault / required
indexpositional or keyword-1
Unique.purge_func(self, func)

Source line 5150

ParameterPassing conventionDefault / required
funcpositional or keywordrequired
Unique.__call__(self, v)

Source line 5155

ParameterPassing conventionDefault / required
vpositional or keywordrequired
Unique.__len__(self)

Source line 5164

No caller-supplied parameters are declared.

Unique.__getitem__(self, key)

Source line 5166

ParameterPassing conventionDefault / required
keypositional or keywordrequired
Unique.__iter__(self)

Source line 5168

No caller-supplied parameters are declared.

Unique.__contains__(self, value)

Source line 5170

ParameterPassing conventionDefault / required
valuepositional or keywordrequired
class UniqueDict

Source line 5173

Construct: UniqueDict()

Fields assigned by the constructor: v. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

UniqueDict.__init__(self)

Source line 5174

No caller-supplied parameters are declared.

UniqueDict.__call__(self, v)

Source line 5176

ParameterPassing conventionDefault / required
vpositional or keywordrequired
UniqueDict.__getitem__(self, key)

Source line 5181

ParameterPassing conventionDefault / required
keypositional or keywordrequired
UniqueDict.__setitem__(self, key, value)

Source line 5183

ParameterPassing conventionDefault / required
keypositional or keywordrequired
valuepositional or keywordrequired
UniqueDict.__iter__(self)

Source line 5188

No caller-supplied parameters are declared.

UniqueDict.__next__(self)

Source line 5191

No caller-supplied parameters are declared.

UniqueDict.all(self)

Source line 5193

No caller-supplied parameters are declared.

count_dict(l, compare=None, estimate=False)

Source line 5198

ParameterPassing conventionDefault / required
lpositional or keywordrequired
comparepositional or keywordNone
estimatepositional or keywordFalse
class TimeEstimate

Source line 5224

Construct: TimeEstimate(amt=None, print_every=None, print_format='<done>/<t> (<p>) | ~<e> Remaining | <a>/trial', over_time_est=None)

Fields assigned by the constructor: amt, over_time_est, print_every, print_format, trial_count. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

TimeEstimate.__init__(self, amt=None, print_every=None, print_format='<done>/<t> (<p>) | ~<e> Remaining | <a>/trial', over_time_est=None)

Source line 5225

ParameterPassing conventionDefault / required
amtpositional or keywordNone
print_everypositional or keywordNone
print_formatpositional or keyword'<done>/<t> (<p>) | ~<e> Remaining | <a>/trial'
over_time_estpositional or keywordNone
TimeEstimate.__iter__(self)

Source line 5233

No caller-supplied parameters are declared.

TimeEstimate.__next__(self)

Source line 5242

No caller-supplied parameters are declared.

TimeEstimate.format(self, format_str)

Source line 5267

ParameterPassing conventionDefault / required
format_strpositional or keywordrequired
TimeEstimate.remaining(self)

Source line 5291

Decorators: @property

No caller-supplied parameters are declared.

TimeEstimate.percent_done(self)

Source line 5294

Decorators: @property

No caller-supplied parameters are declared.

TimeEstimate.percent_done_str(self)

Source line 5297

Decorators: @property

No caller-supplied parameters are declared.

TimeEstimate.estimate(self)

Source line 5300

Decorators: @property

No caller-supplied parameters are declared.

TimeEstimate.estimate_str(self)

Source line 5303

Decorators: @property

No caller-supplied parameters are declared.

TimeEstimate.duration(self)

Source line 5306

Decorators: @property

No caller-supplied parameters are declared.

TimeEstimate.end_duration_estimate(self)

Source line 5312

Decorators: @property

No caller-supplied parameters are declared.

TimeEstimate.duration_str(self)

Source line 5318

Decorators: @property

No caller-supplied parameters are declared.

TimeEstimate.avg_duration(self)

Source line 5321

Decorators: @property

No caller-supplied parameters are declared.

TimeEstimate.avg_duration_str(self)

Source line 5330

Decorators: @property

No caller-supplied parameters are declared.

TimeEstimate.print_results(self)

Source line 5332

No caller-supplied parameters are declared.

TimeEstimate.txt_results(self)

Source line 5336

No caller-supplied parameters are declared.

class ReverseListIter

Source line 5342

Construct: ReverseListIter(item)

Declared functions, properties, and nested objects:

ReverseListIter.__init__(self, item)

Source line 5343

ParameterPassing conventionDefault / required
itempositional or keywordrequired
ReverseListIter.__iter__(self)

Source line 5347

No caller-supplied parameters are declared.

ReverseListIter.__next__(self)

Source line 5350

No caller-supplied parameters are declared.

make_json_parsable(d)

Source line 5357

ParameterPassing conventionDefault / required
dpositional or keywordrequired
dict_print(d, indent=2, parse=True)

Source line 5393

ParameterPassing conventionDefault / required
dpositional or keywordrequired
indentpositional or keyword2
parsepositional or keywordTrue
class TxtParserExp

Source line 5405

Construct: TxtParserExp(format_txt, var_chars=['<', '>'], handle_not_found=False, possible_chars=['[', ']'])

Fields assigned by the constructor: format_txt, formats, handle_not_found, possible_chars, var_chars. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

TxtParserExp.__init__(self, format_txt, var_chars=['<', '>'], handle_not_found=False, possible_chars=['[', ']'])

Source line 5406

ParameterPassing conventionDefault / required
format_txtpositional or keywordrequired
var_charspositional or keyword['<', '>']
handle_not_foundpositional or keywordFalse
possible_charspositional or keyword['[', ']']
TxtParserExp.__call__(self, txt, **kwargs)

Source line 5495

ParameterPassing conventionDefault / required
txtpositional or keywordrequired
kwargsextra keyword arguments (**kwargs)optional collection
class TxtParser

Source line 5562

Construct: TxtParser(format_txt, var_chars=['<', '>'], handle_not_found=False, possible_chars=['[', ']'])

Fields assigned by the constructor: format_txt, formats, handle_not_found, possible_chars, regex_format, var_chars. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

TxtParser.__init__(self, format_txt, var_chars=['<', '>'], handle_not_found=False, possible_chars=['[', ']'])

Source line 5568

ParameterPassing conventionDefault / required
format_txtpositional or keywordrequired
var_charspositional or keyword['<', '>']
handle_not_foundpositional or keywordFalse
possible_charspositional or keyword['[', ']']
TxtParser.__call__(self, txt, **kwargs)

Source line 5634

ParameterPassing conventionDefault / required
txtpositional or keywordrequired
kwargsextra keyword arguments (**kwargs)optional collection
class TxtParserBasic

Source line 5725

Construct: TxtParserBasic(format_txt, var_chars=['<', '>'], handle_not_found=False)

Fields assigned by the constructor: format_txt, formats, handle_not_found, var_chars. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

TxtParserBasic.__init__(self, format_txt, var_chars=['<', '>'], handle_not_found=False)

Source line 5726

ParameterPassing conventionDefault / required
format_txtpositional or keywordrequired
var_charspositional or keyword['<', '>']
handle_not_foundpositional or keywordFalse
TxtParserBasic.__call__(self, txt, **kwargs)

Source line 5761

ParameterPassing conventionDefault / required
txtpositional or keywordrequired
kwargsextra keyword arguments (**kwargs)optional collection
split_multi_old(txt, *items, amt=None, cap_sensitive=True)

Source line 5812

ParameterPassing conventionDefault / required
txtpositional or keywordrequired
itemsextra positional arguments (*args)optional collection
amtkeyword onlyNone
cap_sensitivekeyword onlyTrue
split_old(txt, item, amt=None, cap_sensitive=True)

Source line 5869

ParameterPassing conventionDefault / required
txtpositional or keywordrequired
itempositional or keywordrequired
amtpositional or keywordNone
cap_sensitivepositional or keywordTrue
split_multi(txt, *items, amt=None, cap_sensitive=True)

Source line 5900

ParameterPassing conventionDefault / required
txtpositional or keywordrequired
itemsextra positional arguments (*args)optional collection
amtkeyword onlyNone
cap_sensitivekeyword onlyTrue
split(txt, item, amt=None, cap_sensitive=True)

Source line 5927

ParameterPassing conventionDefault / required
txtpositional or keywordrequired
itempositional or keywordrequired
amtpositional or keywordNone
cap_sensitivepositional or keywordTrue
class AndroidDevice

Source line 5936

Construct: AndroidDevice(r)

Fields assigned by the constructor: device, marketing_name, model, retail_branding. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

class AndroidDevice._DeviceIndex

Source line 5940

Construct: AndroidDevice._DeviceIndex(d, attr, f_idx=0)

Fields assigned by the constructor: attr, d, f_idx, index. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

AndroidDevice._DeviceIndex.__init__(self, d, attr, f_idx=0)

Source line 5941

ParameterPassing conventionDefault / required
dpositional or keywordrequired
attrpositional or keywordrequired
f_idxpositional or keyword0
AndroidDevice._DeviceIndex.get(self, i)

Source line 5977

ParameterPassing conventionDefault / required
ipositional or keywordrequired
AndroidDevice.model_index(cls)

Source line 5996

Decorators: @CachedClassProperty

No caller-supplied parameters are declared.

AndroidDevice.opt_models(cls)

Source line 6000

Decorators: @CachedClassProperty

No caller-supplied parameters are declared.

AndroidDevice.devices(cls)

Source line 6011

Decorators: @ClassProperty

No caller-supplied parameters are declared.

AndroidDevice.data(cls)

Source line 6019

Decorators: @ClassProperty

No caller-supplied parameters are declared.

AndroidDevice.__init__(self, r)

Source line 6076

ParameterPassing conventionDefault / required
rpositional or keywordrequired
AndroidDevice.__str__(self)

Source line 6081

No caller-supplied parameters are declared.

AndroidDevice.__contains__(self, value)

Source line 6092

ParameterPassing conventionDefault / required
valuepositional or keywordrequired
AndroidDevice.get_model(model)

Source line 6094

ParameterPassing conventionDefault / required
modelpositional or keywordrequired
AndroidDevice.__repr__(self)

Source line 6107

No caller-supplied parameters are declared.

class AgentFormat

Source line 6110

Construct: AgentFormat(parser, os, device=None, is_mobile=None, is_tablet=None)

Fields assigned by the constructor: device, is_mobile, is_tablet, os, parser. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

AgentFormat.__init__(self, parser, os, device=None, is_mobile=None, is_tablet=None)

Source line 6111

ParameterPassing conventionDefault / required
parserpositional or keywordrequired
ospositional or keywordrequired
devicepositional or keywordNone
is_mobilepositional or keywordNone
is_tabletpositional or keywordNone
AgentFormat.__call__(self, *args, **kwargs)

Source line 6117

ParameterPassing conventionDefault / required
argsextra positional arguments (*args)optional collection
kwargsextra keyword arguments (**kwargs)optional collection
AgentFormat.__str__(self)

Source line 6119

No caller-supplied parameters are declared.

class UserAgent

Source line 6121

Construct: UserAgent(txt)

Fields assigned by the constructor: device, extra_info, os, os_version, txt. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

UserAgent.from_request(cls, request)

Source line 6187

Decorators: @classmethod

ParameterPassing conventionDefault / required
requestpositional or keywordrequired
class UserAgent.Formats

Source line 6254

No constructor is declared here. Some utility classes group functions for direct class access; use the call style shown in the guide.

Declared functions, properties, and nested objects:

class UserAgent.Formats._opt_iter

Source line 6255

Construct: UserAgent.Formats._opt_iter(opt, remove=[])

Fields assigned by the constructor: l, opt. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

UserAgent.Formats._opt_iter.__init__(self, opt, remove=[])

Source line 6256

ParameterPassing conventionDefault / required
optpositional or keywordrequired
removepositional or keyword[]
UserAgent.Formats._opt_iter.__iter__(self)

Source line 6269

No caller-supplied parameters are declared.

UserAgent.Formats._opt_iter.__next__(self)

Source line 6272

No caller-supplied parameters are declared.

class UserAgent.Formats._opt_iters

Source line 6274

No constructor is declared here. Some utility classes group functions for direct class access; use the call style shown in the guide.

Declared functions, properties, and nested objects:

UserAgent.Formats._opt_iters.i1(cls)

Source line 6276

Decorators: @CachedClassProperty

No caller-supplied parameters are declared.

UserAgent.Formats._opt_iters.i2(cls)

Source line 6281

Decorators: @CachedClassProperty

No caller-supplied parameters are declared.

UserAgent.Formats._opt_iters.i3(cls)

Source line 6286

Decorators: @CachedClassProperty

No caller-supplied parameters are declared.

UserAgent.Formats._opt_iters.i4(cls)

Source line 6291

Decorators: @CachedClassProperty

No caller-supplied parameters are declared.

UserAgent.Formats._opt_iters.i5(cls)

Source line 6296

Decorators: @CachedClassProperty

No caller-supplied parameters are declared.

UserAgent.Formats._opt_iters.i6(cls)

Source line 6301

Decorators: @CachedClassProperty

No caller-supplied parameters are declared.

UserAgent.Formats._opt_iters.i7(cls)

Source line 6306

Decorators: @CachedClassProperty

No caller-supplied parameters are declared.

UserAgent.Formats._opt_iters.i8(cls)

Source line 6311

Decorators: @CachedClassProperty

No caller-supplied parameters are declared.

UserAgent.Formats._opt_iters.i9(cls)

Source line 6316

Decorators: @CachedClassProperty

No caller-supplied parameters are declared.

UserAgent.Formats.opt(text, base)

Source line 6345

ParameterPassing conventionDefault / required
textpositional or keywordrequired
basepositional or keywordrequired
class UserAgent.Version

Source line 6517

Construct: UserAgent.Version(v_str)

Fields assigned by the constructor: extra, major, minor, patch, raw, short. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

UserAgent.Version.__init__(self, v_str)

Source line 6518

ParameterPassing conventionDefault / required
v_strpositional or keywordrequired
UserAgent.Version.__lt__(self, other)

Source line 6559

ParameterPassing conventionDefault / required
otherpositional or keywordrequired
UserAgent.Version.__gt__(self, other)

Source line 6573

ParameterPassing conventionDefault / required
otherpositional or keywordrequired
UserAgent.Version.__eq__(self, other: object) -> bool

Source line 6575

ParameterPassing conventionDefault / required
other: objectpositional or keywordrequired

Return annotation: bool.

UserAgent.Version.__str__(self)

Source line 6580

No caller-supplied parameters are declared.

UserAgent.Version.__repr__(self)

Source line 6582

No caller-supplied parameters are declared.

UserAgent.__init__(self, txt)

Source line 6601

ParameterPassing conventionDefault / required
txtpositional or keywordrequired
UserAgent.base(self)

Source line 6655

Decorators: @CachedProperty

No caller-supplied parameters are declared.

UserAgent.is_mobile(self)

Source line 6664

Decorators: @CachedProperty

No caller-supplied parameters are declared.

UserAgent.is_crawler(self)

Source line 6674

Decorators: @property

No caller-supplied parameters are declared.

UserAgent.browser_version(self)

Source line 6681

Decorators: @CachedProperty

No caller-supplied parameters are declared.

UserAgent.browser(self)

Source line 6687

Decorators: @CachedProperty

No caller-supplied parameters are declared.

UserAgent.is_google(self)

Source line 6798

Decorators: @CachedProperty

No caller-supplied parameters are declared.

UserAgent.is_bing(self)

Source line 6805

Decorators: @property

No caller-supplied parameters are declared.

UserAgent.is_bot(self)

Source line 6808

Decorators: @CachedProperty

No caller-supplied parameters are declared.

class Time

Source line 6870

No constructor is declared here. Some utility classes group functions for direct class access; use the call style shown in the guide.

Declared functions, properties, and nested objects:

class Time._TimestampFormat

Source line 6871

Construct: Time._TimestampFormat(name, parser=None)

Fields assigned by the constructor: name, parser, to_datetime. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

Time._TimestampFormat.__init__(self, name, parser=None)

Source line 6888

ParameterPassing conventionDefault / required
namepositional or keywordrequired
parserpositional or keywordNone
Time._TimestampFormat.datetime_convert(self, func)

Source line 6892

ParameterPassing conventionDefault / required
funcpositional or keywordrequired
Time._TimestampFormat.parser_func(self, func)

Source line 6894

ParameterPassing conventionDefault / required
funcpositional or keywordrequired
Time._TimestampFormat.__call__(self, timestamp_str)

Source line 6896

ParameterPassing conventionDefault / required
timestamp_strpositional or keywordrequired
class Time._Measure

Source line 6902

Construct: Time._Measure(name, short, char, seconds, *aliases)

Fields assigned by the constructor: aliases, char, name, seconds, short. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

Time._Measure.__init__(self, name, short, char, seconds, *aliases)

Source line 6903

ParameterPassing conventionDefault / required
namepositional or keywordrequired
shortpositional or keywordrequired
charpositional or keywordrequired
secondspositional or keywordrequired
aliasesextra positional arguments (*args)optional collection
Time._Measure.__float__(self)

Source line 6909

No caller-supplied parameters are declared.

Time._Measure.__str__(self)

Source line 6911

No caller-supplied parameters are declared.

Time._Measure.__repr__(self)

Source line 6913

No caller-supplied parameters are declared.

Time._Measure.__contains__(self, other)

Source line 6915

ParameterPassing conventionDefault / required
otherpositional or keywordrequired
Time.to_min(amt, dur_str)

Source line 7002

ParameterPassing conventionDefault / required
amtpositional or keywordrequired
dur_strpositional or keywordrequired
Time.parse_datetime(txt)

Source line 7037

ParameterPassing conventionDefault / required
txtpositional or keywordrequired
Time.parse_time(txt)

Source line 7045

ParameterPassing conventionDefault / required
txtpositional or keywordrequired
Time.date_formats(*args)

Source line 7093

Decorators: @CachedClassProperty

ParameterPassing conventionDefault / required
argsextra positional arguments (*args)optional collection
Time.parse_date(txt)

Source line 7116

ParameterPassing conventionDefault / required
txtpositional or keywordrequired
is_class_instance(t)

Source line 7158

ParameterPassing conventionDefault / required
tpositional or keywordrequired
class WebRequestInfo

Source line 7165

Construct: WebRequestInfo(user_agent, ip)

Fields assigned by the constructor: ip_raw, ua, ua_raw. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

WebRequestInfo.__init__(self, user_agent, ip)

Source line 7166

ParameterPassing conventionDefault / required
user_agentpositional or keywordrequired
ippositional or keywordrequired
WebRequestInfo.ip(self)

Source line 7171

Decorators: @CachedProperty

No caller-supplied parameters are declared.

WebRequestInfo.is_google_confirm(self, two_way_confirm=True)

Source line 7173

ParameterPassing conventionDefault / required
two_way_confirmpositional or keywordTrue
WebRequestInfo.is_bing_confirm(self, two_way_confirm=True)

Source line 7176

ParameterPassing conventionDefault / required
two_way_confirmpositional or keywordTrue
WebRequestInfo.is_baidu_confirm(self, two_way_confirm=True)

Source line 7179

ParameterPassing conventionDefault / required
two_way_confirmpositional or keywordTrue
WebRequestInfo.is_yahoo_confirm(self, two_way_confirm=True)

Source line 7182

ParameterPassing conventionDefault / required
two_way_confirmpositional or keywordTrue
WebRequestInfo.is_yandex_confirm(self, two_way_confirm=True)

Source line 7185

ParameterPassing conventionDefault / required
two_way_confirmpositional or keywordTrue
WebRequestInfo.is_crawler_confirm(self, two_way_confirm=True)

Source line 7188

ParameterPassing conventionDefault / required
two_way_confirmpositional or keywordTrue
is_json_parsable(d)

Source line 7238

ParameterPassing conventionDefault / required
dpositional or keywordrequired
epoch(epoch_timestamp=None)

Source line 7284

ParameterPassing conventionDefault / required
epoch_timestamppositional or keywordNone
class ActionQueue

Source line 7291

Construct: ActionQueue(queue_file='queue.json', queue_file_type=None, loop_interval=60, remove_on_err=True)

Fields assigned by the constructor: actions, logger, loop_count, loop_interval, queue_db, queue_file, queue_file_type, remove_on_err, run_queue. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

class ActionQueue.Item

Source line 7294

Construct: ActionQueue.Item(d, q)

Fields assigned by the constructor: action, activate, created, d, data, q. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

ActionQueue.Item.__init__(self, d, q)

Source line 7295

ParameterPassing conventionDefault / required
dpositional or keywordrequired
qpositional or keywordrequired
async ActionQueue.Item.remove(self)

Source line 7302

No caller-supplied parameters are declared.

Declared with async def. Normal calls return an awaitable, or an async generator if the body yields. Decorated properties may be accessed differently; follow the object guide.

ActionQueue.Item.hash(self)

Source line 7322

Decorators: @CachedProperty

No caller-supplied parameters are declared.

ActionQueue.Item.__repr__(self)

Source line 7327

No caller-supplied parameters are declared.

ActionQueue.__init__(self, queue_file='queue.json', queue_file_type=None, loop_interval=60, remove_on_err=True)

Source line 7329

ParameterPassing conventionDefault / required
queue_filepositional or keyword'queue.json'
queue_file_typepositional or keywordNone
loop_intervalpositional or keyword60
remove_on_errpositional or keywordTrue
async ActionQueue.items(self)

Source line 7385

Decorators: @CachedProperty

No caller-supplied parameters are declared.

Declared with async def. Normal calls return an awaitable, or an async generator if the body yields. Decorated properties may be accessed differently; follow the object guide.

class ActionQueue._check_iter

Source line 7422

Construct: ActionQueue._check_iter(i, q)

Fields assigned by the constructor: i, q. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

ActionQueue._check_iter.__init__(self, i, q)

Source line 7423

ParameterPassing conventionDefault / required
ipositional or keywordrequired
qpositional or keywordrequired
ActionQueue._check_iter.hash(self)

Source line 7426

No caller-supplied parameters are declared.

ActionQueue._check_iter.__iter__(self)

Source line 7431

No caller-supplied parameters are declared.

ActionQueue._check_iter.__next__(self)

Source line 7436

No caller-supplied parameters are declared.

ActionQueue._check_iter.sort(self)

Source line 7456

No caller-supplied parameters are declared.

ActionQueue.start(self)

Source line 7497

No caller-supplied parameters are declared.

async ActionQueue.run(self)

Source line 7499

No caller-supplied parameters are declared.

Declared with async def. Normal calls return an awaitable, or an async generator if the body yields. Decorated properties may be accessed differently; follow the object guide.

ActionQueue.to_thread(self)

Source line 7501

No caller-supplied parameters are declared.

ActionQueue.action(self, func)

Source line 7514

ParameterPassing conventionDefault / required
funcpositional or keywordrequired
async ActionQueue.create_action(self, action, data=None, activate=None)

Source line 7521

ParameterPassing conventionDefault / required
actionpositional or keywordrequired
datapositional or keywordNone
activatepositional or keywordNone

Declared with async def. Normal calls return an awaitable, or an async generator if the body yields. Decorated properties may be accessed differently; follow the object guide.

class iCalendar

Source line 7582

Construct: iCalendar(name, uid, default_organizer_name=None, default_organizer_email=None)

Fields assigned by the constructor: default_organizer_email, default_organizer_name, events, name, uid, url. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

iCalendar.property_formatter(name, value, properties={})

Source line 7583

ParameterPassing conventionDefault / required
namepositional or keywordrequired
valuepositional or keywordrequired
propertiespositional or keyword{}
iCalendar.date_formatter(dt)

Source line 7590

ParameterPassing conventionDefault / required
dtpositional or keywordrequired
iCalendar.datetime_formatter(dt)

Source line 7603

ParameterPassing conventionDefault / required
dtpositional or keywordrequired
class iCalendar.Event

Source line 7630

Construct: iCalendar.Event(ical, name, uid, dt_start, dt_end=None, description=None, organizer_name=None, organizer_email=None, location=None)

Fields assigned by the constructor: description, dt_end, dt_start, ical, location, name, organizer_email, organizer_name, uid. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

iCalendar.Event.__init__(self, ical, name, uid, dt_start, dt_end=None, description=None, organizer_name=None, organizer_email=None, location=None)

Source line 7631

ParameterPassing conventionDefault / required
icalpositional or keywordrequired
namepositional or keywordrequired
uidpositional or keywordrequired
dt_startpositional or keywordrequired
dt_endpositional or keywordNone
descriptionpositional or keywordNone
organizer_namepositional or keywordNone
organizer_emailpositional or keywordNone
locationpositional or keywordNone
iCalendar.Event.generate(self)

Source line 7641

No caller-supplied parameters are declared.

iCalendar.__init__(self, name, uid, default_organizer_name=None, default_organizer_email=None)

Source line 7666

ParameterPassing conventionDefault / required
namepositional or keywordrequired
uidpositional or keywordrequired
default_organizer_namepositional or keywordNone
default_organizer_emailpositional or keywordNone
iCalendar.add_event(self, name, uid, dt_start, dt_end=None, description=None, organizer_name=None, organizer_email=None, location=None)

Source line 7673

ParameterPassing conventionDefault / required
namepositional or keywordrequired
uidpositional or keywordrequired
dt_startpositional or keywordrequired
dt_endpositional or keywordNone
descriptionpositional or keywordNone
organizer_namepositional or keywordNone
organizer_emailpositional or keywordNone
locationpositional or keywordNone
iCalendar.generate(self)

Source line 7692

No caller-supplied parameters are declared.

class vCard

Source line 7708

Construct: vCard(first_name, last_name, address=None, organization=None, title=None, url=None)

Fields assigned by the constructor: address, address_types, emails, first_name, full_name, last_name, organization, phones, title, url. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

vCard.property_formatter(name, value, properties={})

Source line 7709

ParameterPassing conventionDefault / required
namepositional or keywordrequired
valuepositional or keywordrequired
propertiespositional or keyword{}
vCard.date_formatter(dt)

Source line 7716

ParameterPassing conventionDefault / required
dtpositional or keywordrequired
vCard.datetime_formatter(dt)

Source line 7729

ParameterPassing conventionDefault / required
dtpositional or keywordrequired
vCard.__init__(self, first_name, last_name, address=None, organization=None, title=None, url=None)

Source line 7756

ParameterPassing conventionDefault / required
first_namepositional or keywordrequired
last_namepositional or keywordrequired
addresspositional or keywordNone
organizationpositional or keywordNone
titlepositional or keywordNone
urlpositional or keywordNone
vCard.add_phone(self, phone, phone_types=['HOME', 'VOICE'])

Source line 7767

ParameterPassing conventionDefault / required
phonepositional or keywordrequired
phone_typespositional or keyword['HOME', 'VOICE']
vCard.add_email(self, email, email_types=['INTERNET', 'WORK'])

Source line 7784

ParameterPassing conventionDefault / required
emailpositional or keywordrequired
email_typespositional or keyword['INTERNET', 'WORK']
vCard.set_organization(self, organization)

Source line 7798

ParameterPassing conventionDefault / required
organizationpositional or keywordrequired
vCard.set_address(self, address, address_types=['HOME'])

Source line 7805

ParameterPassing conventionDefault / required
addresspositional or keywordrequired
address_typespositional or keyword['HOME']
vCard.set_title(self, title)

Source line 7828

ParameterPassing conventionDefault / required
titlepositional or keywordrequired
vCard.set_url(self, url)

Source line 7835

ParameterPassing conventionDefault / required
urlpositional or keywordrequired
vCard.__str__(self)

Source line 7842

No caller-supplied parameters are declared.

vCard.generate(self)

Source line 7844

No caller-supplied parameters are declared.

class Address

Source line 8753

Represents an address with properties for address line 1, address line 2, city, state, and zip code.

Construct: Address(d, correct_address=True, parse_address=True)

Fields assigned by the constructor: address1, address2, city, parsed_address, state, zip. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

Address.__init__(self, d, correct_address=True, parse_address=True)

Source line 8762

ParameterPassing conventionDefault / required
dpositional or keywordrequired
correct_addresspositional or keywordTrue
parse_addresspositional or keywordTrue
Address.__str__(self)

Source line 8930

No caller-supplied parameters are declared.

Address.to_dict(self)

Source line 8935

No caller-supplied parameters are declared.

Address.get_dict(self)

Source line 8943

No caller-supplied parameters are declared.

Address.parsed_address(self)

Source line 8947

Decorators: @CachedProperty

No caller-supplied parameters are declared.

Address.compare_address(self)

Source line 8951

Decorators: @CachedProperty

No caller-supplied parameters are declared.

Address.street(self)

Source line 8955

Decorators: @property

No caller-supplied parameters are declared.

Address.address(self)

Source line 8958

Decorators: @property

No caller-supplied parameters are declared.

Address.address2_int(self)

Source line 8961

Decorators: @CachedProperty

No caller-supplied parameters are declared.

Address.street2(self)

Source line 8964

Decorators: @property

No caller-supplied parameters are declared.

Address.zip_code(self)

Source line 8967

Decorators: @property

No caller-supplied parameters are declared.

Address.postal_code(self)

Source line 8970

Decorators: @property

No caller-supplied parameters are declared.

Address.__repr__(self)

Source line 8973

No caller-supplied parameters are declared.

Address.__eq__(self, value: object) -> bool

Source line 8976

Check if the current Address object is equal to another object.

Args:
    value (object): The object to compare with.

Returns:
    bool: True if the objects are equal, False otherwise.
ParameterPassing conventionDefault / required
value: objectpositional or keywordrequired

Return annotation: bool.

Address.parse_address(txt)

Source line 9010

ParameterPassing conventionDefault / required
txtpositional or keywordrequired
async run_code(code, **kwargs)

Source line 9178

ParameterPassing conventionDefault / required
codepositional or keywordrequired
kwargsextra keyword arguments (**kwargs)optional collection

Declared with async def. Normal calls return an awaitable, or an async generator if the body yields. Decorated properties may be accessed differently; follow the object guide.

class CodeFormat

Source line 9232

Construct: CodeFormat()

Fields assigned by the constructor: con_lexer, formatter, lexer, trace_lexer. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

CodeFormat.__init__(self)

Source line 9233

No caller-supplied parameters are declared.

CodeFormat.styling(self)

Source line 9238

No caller-supplied parameters are declared.

CodeFormat.code_format(self, txt, linenos=False)

Source line 9243

ParameterPassing conventionDefault / required
txtpositional or keywordrequired
linenospositional or keywordFalse
CodeFormat.console_format(self, txt, linenos=False)

Source line 9245

ParameterPassing conventionDefault / required
txtpositional or keywordrequired
linenospositional or keywordFalse
CodeFormat.traceback_format(self, txt, linenos=False)

Source line 9247

ParameterPassing conventionDefault / required
txtpositional or keywordrequired
linenospositional or keywordFalse
class StandardRequest

Source line 9311

Construct: StandardRequest(request)

Fields assigned by the constructor: cookies, headers, method, remote, request, url, user_agent. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

StandardRequest.__init__(self, request)

Source line 9312

ParameterPassing conventionDefault / required
requestpositional or keywordrequired
StandardRequest.path(self)

Source line 9397

Decorators: @CachedProperty

No caller-supplied parameters are declared.

StandardRequest.scheme(self)

Source line 9401

Decorators: @CachedProperty

No caller-supplied parameters are declared.

StandardRequest.query_string(self)

Source line 9405

Decorators: @CachedProperty

No caller-supplied parameters are declared.

StandardRequest.query(self)

Source line 9409

Decorators: @CachedProperty

No caller-supplied parameters are declared.

StandardRequest.args(self)

Source line 9413

Decorators: @property

No caller-supplied parameters are declared.

StandardRequest.ip(self)

Source line 9416

Decorators: @property

No caller-supplied parameters are declared.

async StandardRequest.ip_info(self)

Source line 9419

Decorators: @CachedProperty

No caller-supplied parameters are declared.

Declared with async def. Normal calls return an awaitable, or an async generator if the body yields. Decorated properties may be accessed differently; follow the object guide.

StandardRequest.body(self)

Source line 9423

Decorators: @CachedProperty

No caller-supplied parameters are declared.

async StandardRequest.load(self)

Source line 9430

No caller-supplied parameters are declared.

Declared with async def. Normal calls return an awaitable, or an async generator if the body yields. Decorated properties may be accessed differently; follow the object guide.

StandardRequest.__await__(self)

Source line 9436

No caller-supplied parameters are declared.

class ListIndex

Source line 9440

Construct: ListIndex(d, key=str, f_idx=0, nested_indexes=None)

Fields assigned by the constructor: d, f_idx, index, key, nested_indexes. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

ListIndex.__init__(self, d, key=str, f_idx=0, nested_indexes=None)

Source line 9441

ParameterPassing conventionDefault / required
dpositional or keywordrequired
keypositional or keywordstr
f_idxpositional or keyword0
nested_indexespositional or keywordNone
ListIndex.get(self, i, case_insensitive=False)

Source line 9484

ParameterPassing conventionDefault / required
ipositional or keywordrequired
case_insensitivepositional or keywordFalse
ListIndex.get_ci(self, i)

Source line 9505

ParameterPassing conventionDefault / required
ipositional or keywordrequired
ListIndex.get_list(self, i, case_insensitive=False)

Source line 9525

ParameterPassing conventionDefault / required
ipositional or keywordrequired
case_insensitivepositional or keywordFalse
ListIndex.get_ci_list(self, i)

Source line 9548

ParameterPassing conventionDefault / required
ipositional or keywordrequired
ListIndex.get_index(self, i, case_insensitive=False)

Source line 9570

ParameterPassing conventionDefault / required
ipositional or keywordrequired
case_insensitivepositional or keywordFalse
ListIndex.get_index_ci(self, i)

Source line 9591

ParameterPassing conventionDefault / required
ipositional or keywordrequired
ListIndex.add(self, i)

Source line 9681

ParameterPassing conventionDefault / required
ipositional or keywordrequired
ListIndex.append(self, i)

Source line 9700

ParameterPassing conventionDefault / required
ipositional or keywordrequired
ListIndex.count(self, i)

Source line 9702

ParameterPassing conventionDefault / required
ipositional or keywordrequired
ListIndex.__contains__(self, other)

Source line 9704

ParameterPassing conventionDefault / required
otherpositional or keywordrequired
ListIndex.__iter__(self)

Source line 9706

No caller-supplied parameters are declared.

ListIndex.__getitem__(self, value)

Source line 9708

ParameterPassing conventionDefault / required
valuepositional or keywordrequired
ListIndex.__len__(self)

Source line 9714

No caller-supplied parameters are declared.

class SortedList

Source line 9720

Construct: SortedList(d, key=str, reverse=False)

Fields assigned by the constructor: d, key, reverse. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

SortedList.__init__(self, d, key=str, reverse=False)

Source line 9721

ParameterPassing conventionDefault / required
dpositional or keywordrequired
keypositional or keywordstr
reversepositional or keywordFalse
SortedList.append(self, new)

Source line 9728

ParameterPassing conventionDefault / required
newpositional or keywordrequired
SortedList.add(self, new_value)

Source line 9730

ParameterPassing conventionDefault / required
new_valuepositional or keywordrequired
SortedList.__contains__(self, other)

Source line 9796

ParameterPassing conventionDefault / required
otherpositional or keywordrequired
SortedList.__iter__(self)

Source line 9798

No caller-supplied parameters are declared.

SortedList.__getitem__(self, value)

Source line 9800

ParameterPassing conventionDefault / required
valuepositional or keywordrequired
SortedList.__len__(self)

Source line 9802

No caller-supplied parameters are declared.

class AttrDict

Source line 9805

Construct: AttrDict(data={})

Declared functions, properties, and nested objects:

AttrDict.__init__(self, data={})

Source line 9806

ParameterPassing conventionDefault / required
datapositional or keyword{}
AttrDict.__getattr__(self, name)

Source line 9808

ParameterPassing conventionDefault / required
namepositional or keywordrequired
AttrDict.__setattr__(self, name, value)

Source line 9814

ParameterPassing conventionDefault / required
namepositional or keywordrequired
valuepositional or keywordrequired
AttrDict.__getitem__(self, key)

Source line 9817

ParameterPassing conventionDefault / required
keypositional or keywordrequired
AttrDict.__setitem__(self, key, value)

Source line 9820

ParameterPassing conventionDefault / required
keypositional or keywordrequired
valuepositional or keywordrequired
AttrDict.__delitem__(self, key)

Source line 9823

ParameterPassing conventionDefault / required
keypositional or keywordrequired
AttrDict.get(self, name, default=None)

Source line 9826

ParameterPassing conventionDefault / required
namepositional or keywordrequired
defaultpositional or keywordNone
count_print(v, max_lines=None)

Source line 9831

ParameterPassing conventionDefault / required
vpositional or keywordrequired
max_linespositional or keywordNone
class ServerAnalytics

Source line 9847

Construct: ServerAnalytics()

Fields assigned by the constructor: recent_requests. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

ServerAnalytics.__init__(self)

Source line 9848

No caller-supplied parameters are declared.

class ReqInfo

Source line 9852

Construct: ReqInfo(*args)

Fields assigned by the constructor: ip, method, time, url, user_agent. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

ReqInfo.__init__(self, *args)

Source line 9853

ParameterPassing conventionDefault / required
argsextra positional arguments (*args)optional collection
ReqInfo.to_dict(self)

Source line 9870

No caller-supplied parameters are declared.

ReqInfo.get_id(self)

Source line 9878

No caller-supplied parameters are declared.

ReqInfo.link_info(self)

Source line 9888

Decorators: @CachedProperty

No caller-supplied parameters are declared.

ReqInfo.path(self)

Source line 9891

Decorators: @property

No caller-supplied parameters are declared.

ReqInfo.ua_raw(self)

Source line 9894

Decorators: @property

No caller-supplied parameters are declared.

ReqInfo.user_agent_info(self)

Source line 9897

Decorators: @CachedProperty

No caller-supplied parameters are declared.

ReqInfo.device(self)

Source line 9900

Decorators: @CachedProperty

No caller-supplied parameters are declared.

ReqInfo.browser(self)

Source line 9904

Decorators: @CachedProperty

No caller-supplied parameters are declared.

ReqInfo.os(self)

Source line 9907

Decorators: @CachedProperty

No caller-supplied parameters are declared.

ReqInfo.is_mobile(self)

Source line 9910

Decorators: @CachedProperty

No caller-supplied parameters are declared.

ReqInfo.browser(self)

Source line 9913

Decorators: @CachedProperty

No caller-supplied parameters are declared.

ReqInfo.ip_info(self)

Source line 9917

Decorators: @CachedProperty

No caller-supplied parameters are declared.

ReqInfo.country(self)

Source line 9925

Decorators: @CachedProperty

No caller-supplied parameters are declared.

ReqInfo.region(self)

Source line 9928

Decorators: @CachedProperty

No caller-supplied parameters are declared.

ReqInfo.city(self)

Source line 9931

Decorators: @CachedProperty

No caller-supplied parameters are declared.

ReqInfo.asn(self)

Source line 9934

Decorators: @CachedProperty

No caller-supplied parameters are declared.

ReqInfo.org(self)

Source line 9937

Decorators: @CachedProperty

No caller-supplied parameters are declared.

ReqInfo.location(self)

Source line 9940

Decorators: @CachedProperty

No caller-supplied parameters are declared.

ReqInfo.hostname(self)

Source line 9943

Decorators: @CachedProperty

No caller-supplied parameters are declared.

ReqInfo.is_google_confirm(self, two_way_confirm=True)

Source line 9947

ParameterPassing conventionDefault / required
two_way_confirmpositional or keywordTrue
ReqInfo.is_bing_confirm(self, two_way_confirm=True)

Source line 9950

ParameterPassing conventionDefault / required
two_way_confirmpositional or keywordTrue
ReqInfo.is_baidu_confirm(self, two_way_confirm=True)

Source line 9953

ParameterPassing conventionDefault / required
two_way_confirmpositional or keywordTrue
ReqInfo.is_yahoo_confirm(self, two_way_confirm=True)

Source line 9956

ParameterPassing conventionDefault / required
two_way_confirmpositional or keywordTrue
ReqInfo.is_yandex_confirm(self, two_way_confirm=True)

Source line 9959

ParameterPassing conventionDefault / required
two_way_confirmpositional or keywordTrue
ReqInfo.is_crawler_confirm(self, two_way_confirm=True)

Source line 9962

ParameterPassing conventionDefault / required
two_way_confirmpositional or keywordTrue
class Version

Source line 10019

Construct: Version(v_str)

Fields assigned by the constructor: extra, major, minor, patch, raw, short. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

Version.__init__(self, v_str)

Source line 10020

ParameterPassing conventionDefault / required
v_strpositional or keywordrequired
Version.__lt__(self, other)

Source line 10056

ParameterPassing conventionDefault / required
otherpositional or keywordrequired
Version.__gt__(self, other)

Source line 10072

ParameterPassing conventionDefault / required
otherpositional or keywordrequired
Version.__le__(self, other)

Source line 10074

ParameterPassing conventionDefault / required
otherpositional or keywordrequired
Version.__ge__(self, other)

Source line 10076

ParameterPassing conventionDefault / required
otherpositional or keywordrequired
Version.__eq__(self, other: object) -> bool

Source line 10078

ParameterPassing conventionDefault / required
other: objectpositional or keywordrequired

Return annotation: bool.

Version.__str__(self)

Source line 10085

No caller-supplied parameters are declared.

Version.__repr__(self)

Source line 10087

No caller-supplied parameters are declared.

class Extra

Source line 10106

Construct: Extra(data, identifier, db, table_name, column_name='extra', identifier_column='id', as_dict=False)

Fields assigned by the constructor: as_dict. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

Extra.__init__(self, data, identifier, db, table_name, column_name='extra', identifier_column='id', as_dict=False)

Source line 10109

ParameterPassing conventionDefault / required
datapositional or keywordrequired
identifierpositional or keywordrequired
dbpositional or keywordrequired
table_namepositional or keywordrequired
column_namepositional or keyword'extra'
identifier_columnpositional or keyword'id'
as_dictpositional or keywordFalse
Extra.encoded(self)

Source line 10142

Decorators: @property

No caller-supplied parameters are declared.

Extra.__getitem__(self, key)

Source line 10151

ParameterPassing conventionDefault / required
keypositional or keywordrequired
Extra.__setitem__(self, key, value)

Source line 10153

ParameterPassing conventionDefault / required
keypositional or keywordrequired
valuepositional or keywordrequired
Extra.__delitem__(self, key)

Source line 10155

ParameterPassing conventionDefault / required
keypositional or keywordrequired
Extra.__iter__(self)

Source line 10157

No caller-supplied parameters are declared.

Extra.__len__(self)

Source line 10159

No caller-supplied parameters are declared.

Extra.__str__(self)

Source line 10161

No caller-supplied parameters are declared.

Extra.__contains__(self, key)

Source line 10163

ParameterPassing conventionDefault / required
keypositional or keywordrequired
Extra.get(self, key, default=None)

Source line 10165

ParameterPassing conventionDefault / required
keypositional or keywordrequired
defaultpositional or keywordNone
Extra.set(self, key, value)

Source line 10167

ParameterPassing conventionDefault / required
keypositional or keywordrequired
valuepositional or keywordrequired
Extra.append(self, value)

Source line 10169

ParameterPassing conventionDefault / required
valuepositional or keywordrequired
Extra.add(self, value)

Source line 10171

ParameterPassing conventionDefault / required
valuepositional or keywordrequired
Extra.remove(self, value)

Source line 10173

ParameterPassing conventionDefault / required
valuepositional or keywordrequired
async Extra.save(self)

Source line 10175

No caller-supplied parameters are declared.

Declared with async def. Normal calls return an awaitable, or an async generator if the body yields. Decorated properties may be accessed differently; follow the object guide.

class PhoneNumber

Source line 10179

Construct: PhoneNumber(number)

Fields assigned by the constructor: area_code, country_code, number. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

PhoneNumber.__init__(self, number)

Source line 10180

ParameterPassing conventionDefault / required
numberpositional or keywordrequired
PhoneNumber.e164(self)

Source line 10194

Decorators: @property

No caller-supplied parameters are declared.

PhoneNumber.domestic_format(self)

Source line 10197

Decorators: @property

No caller-supplied parameters are declared.

PhoneNumber.international_format(self)

Source line 10200

Decorators: @property

No caller-supplied parameters are declared.

PhoneNumber.__str__(self)

Source line 10202

No caller-supplied parameters are declared.

PhoneNumber.__eq__(self, other)

Source line 10204

ParameterPassing conventionDefault / required
otherpositional or keywordrequired
PhoneNumber.__len__(self)

Source line 10221

No caller-supplied parameters are declared.

PhoneNumber.__getattr__(self, name)

Source line 10223

ParameterPassing conventionDefault / required
namepositional or keywordrequired
class Permission

Source line 10228

No constructor is declared here. Some utility classes group functions for direct class access; use the call style shown in the guide.

Declared functions, properties, and nested objects:

Permission.evaluate_permission(primary, evaluate)

Source line 10229

ParameterPassing conventionDefault / required
primarypositional or keywordrequired
evaluatepositional or keywordrequired
class plugins

Source line 10247

No constructor is declared here. Some utility classes group functions for direct class access; use the call style shown in the guide.

Declared functions, properties, and nested objects:

class plugins.Mailgun

Source line 10248

Construct: plugins.Mailgun(api_key, domain, default_from=None, default_archive_to=None)

Fields assigned by the constructor: api_key, default_archive_to, default_from, domain. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

plugins.Mailgun.__init__(self, api_key, domain, default_from=None, default_archive_to=None)

Source line 10249

ParameterPassing conventionDefault / required
api_keypositional or keywordrequired
domainpositional or keywordrequired
default_frompositional or keywordNone
default_archive_topositional or keywordNone
async plugins.Mailgun.send_email(self, subject, to, from_email=None, text=None, html=None, template=None, cc=None, bcc=None, reply_to=None, template_variables=None, archive_to=None)

Source line 10254

ParameterPassing conventionDefault / required
subjectpositional or keywordrequired
topositional or keywordrequired
from_emailpositional or keywordNone
textpositional or keywordNone
htmlpositional or keywordNone
templatepositional or keywordNone
ccpositional or keywordNone
bccpositional or keywordNone
reply_topositional or keywordNone
template_variablespositional or keywordNone
archive_topositional or keywordNone

Declared with async def. Normal calls return an awaitable, or an async generator if the body yields. Decorated properties may be accessed differently; follow the object guide.

class plugins.Twilio

Source line 10301

Construct: plugins.Twilio(account_sid, auth_token, default_from=None)

Fields assigned by the constructor: account_sid, auth_token, default_from. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

plugins.Twilio.__init__(self, account_sid, auth_token, default_from=None)

Source line 10302

ParameterPassing conventionDefault / required
account_sidpositional or keywordrequired
auth_tokenpositional or keywordrequired
default_frompositional or keywordNone
async plugins.Twilio.send_sms(self, to, from_phone=None, body=None, media_url=None)

Source line 10307

ParameterPassing conventionDefault / required
topositional or keywordrequired
from_phonepositional or keywordNone
bodypositional or keywordNone
media_urlpositional or keywordNone

Declared with async def. Normal calls return an awaitable, or an async generator if the body yields. Decorated properties may be accessed differently; follow the object guide.

class plugins.Twilio.LookupNumber(PhoneNumber)

Source line 10340

A parsed Twilio Lookup response with PhoneNumber behavior.

Construct: plugins.Twilio.LookupNumber(phone_number, lookup_fields, raw_response)

Fields assigned by the constructor: caller_name, calling_country_code, identity_match, iso_country_code, line_status, line_type_intelligence, lookup_fields, national_format, payload, raw_response, requested_fields, url, valid, validation_errors. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

class plugins.Twilio.LookupNumber.CallerName

Source line 10343

Construct: plugins.Twilio.LookupNumber.CallerName(data)

Fields assigned by the constructor: caller_name, caller_type, error_code, payload. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

plugins.Twilio.LookupNumber.CallerName.__init__(self, data)

Source line 10344

ParameterPassing conventionDefault / required
datapositional or keywordrequired
class plugins.Twilio.LookupNumber.IdentityMatch

Source line 10350

Construct: plugins.Twilio.LookupNumber.IdentityMatch(data)

Fields assigned by the constructor: address_country_match, address_line_match, address_lines_match, city_match, date_of_birth_match, error_code, error_message, first_name_match, last_name_match, national_id_match, payload, postal_code_match, state_match, summary_score. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

plugins.Twilio.LookupNumber.IdentityMatch.__init__(self, data)

Source line 10351

ParameterPassing conventionDefault / required
datapositional or keywordrequired
class plugins.Twilio.LookupNumber.LineStatus

Source line 10368

Construct: plugins.Twilio.LookupNumber.LineStatus(data)

Fields assigned by the constructor: error_code, payload, status. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

plugins.Twilio.LookupNumber.LineStatus.__init__(self, data)

Source line 10369

ParameterPassing conventionDefault / required
datapositional or keywordrequired
plugins.Twilio.LookupNumber.LineStatus.is_line_active(self)

Source line 10375

Decorators: @property

True when active/reachable, False when inactive/unreachable, otherwise None.

No caller-supplied parameters are declared.

class plugins.Twilio.LookupNumber.LineTypeIntelligence

Source line 10384

Construct: plugins.Twilio.LookupNumber.LineTypeIntelligence(data)

Fields assigned by the constructor: carrier_name, error_code, mobile_country_code, mobile_network_code, payload, type. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

plugins.Twilio.LookupNumber.LineTypeIntelligence.__init__(self, data)

Source line 10385

ParameterPassing conventionDefault / required
datapositional or keywordrequired
plugins.Twilio.LookupNumber.__init__(self, phone_number, lookup_fields, raw_response)

Source line 10393

ParameterPassing conventionDefault / required
phone_numberpositional or keywordrequired
lookup_fieldspositional or keywordrequired
raw_responsepositional or keywordrequired
plugins.Twilio.LookupNumber.phone_number(self)

Source line 10430

Decorators: @property

No caller-supplied parameters are declared.

plugins.Twilio.LookupNumber.text(self)

Source line 10434

Decorators: @property

No caller-supplied parameters are declared.

plugins.Twilio.LookupNumber.json(self)

Source line 10437

No caller-supplied parameters are declared.

plugins.Twilio.LookupNumber.raise_for_status(self)

Source line 10442

No caller-supplied parameters are declared.

async plugins.Twilio.lookup(self, phone_number, lookup_fields, **params)

Source line 10455

Look up a phone number and return a LookupNumber. Fields listed below:
- caller_name = name of a caller if available ($.01)
- identity_match = match of a phone number to a person ($.10)
- line_status = line status of a phone number ($.007)
- line_type_intelligence = line type intelligence of a phone number ($.008)

Docs:    https://www.twilio.com/docs/lookup/v2-api
Pricing: https://www.twilio.com/en-us/user-authentication-identity/pricing/lookup
ParameterPassing conventionDefault / required
phone_numberpositional or keywordrequired
lookup_fieldspositional or keywordrequired
paramsextra keyword arguments (**kwargs)optional collection

Declared with async def. Normal calls return an awaitable, or an async generator if the body yields. Decorated properties may be accessed differently; follow the object guide.

async plugins.Twilio.identity_match(self, phone_number, first_name=None, last_name=None, address=None, date_of_birth=None, lookup_fields='identity_match', **params)

Source line 10488

ParameterPassing conventionDefault / required
phone_numberpositional or keywordrequired
first_namepositional or keywordNone
last_namepositional or keywordNone
addresspositional or keywordNone
date_of_birthpositional or keywordNone
lookup_fieldspositional or keyword'identity_match'
paramsextra keyword arguments (**kwargs)optional collection

Declared with async def. Normal calls return an awaitable, or an async generator if the body yields. Decorated properties may be accessed differently; follow the object guide.

async plugins.Twilio.line_status(self, phone)

Source line 10534

ParameterPassing conventionDefault / required
phonepositional or keywordrequired

Declared with async def. Normal calls return an awaitable, or an async generator if the body yields. Decorated properties may be accessed differently; follow the object guide.

async plugins.Twilio.is_line_active(self, phone)

Source line 10536

Returns True if the line is active, False if inactive, and None if unknown. 
ParameterPassing conventionDefault / required
phonepositional or keywordrequired

Declared with async def. Normal calls return an awaitable, or an async generator if the body yields. Decorated properties may be accessed differently; follow the object guide.

class plugins.UserManager

Source line 10543

Construct: plugins.UserManager(dbm, tbl_name='users', mfa_tbl=None, session_validator=None)

Fields assigned by the constructor: db, dbm, hash_func, mfa_tbl, session_validator, tbl_name. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

plugins.UserManager.__init__(self, dbm, tbl_name='users', mfa_tbl=None, session_validator=None) -> None

Source line 10549

ParameterPassing conventionDefault / required
dbmpositional or keywordrequired
tbl_namepositional or keyword'users'
mfa_tblpositional or keywordNone
session_validatorpositional or keywordNone

Return annotation: None.

async plugins.UserManager.mfa(self)

Source line 10626

Decorators: @AsyncProperty

No caller-supplied parameters are declared.

Declared with async def. Normal calls return an awaitable, or an async generator if the body yields. Decorated properties may be accessed differently; follow the object guide.

async plugins.UserManager.users(self)

Source line 10635

Decorators: @CachedProperty

No caller-supplied parameters are declared.

Declared with async def. Normal calls return an awaitable, or an async generator if the body yields. Decorated properties may be accessed differently; follow the object guide.

async plugins.UserManager.add_user(self, username, password)

Source line 10641

ParameterPassing conventionDefault / required
usernamepositional or keywordrequired
passwordpositional or keywordrequired

Declared with async def. Normal calls return an awaitable, or an async generator if the body yields. Decorated properties may be accessed differently; follow the object guide.

async plugins.UserManager.get_user(self, d)

Source line 10657

ParameterPassing conventionDefault / required
dpositional or keywordrequired

Declared with async def. Normal calls return an awaitable, or an async generator if the body yields. Decorated properties may be accessed differently; follow the object guide.

async plugins.UserManager.get_session(self, token)

Source line 10666

ParameterPassing conventionDefault / required
tokenpositional or keywordrequired

Declared with async def. Normal calls return an awaitable, or an async generator if the body yields. Decorated properties may be accessed differently; follow the object guide.

class plugins.UserManager.User

Source line 10671

Construct: plugins.UserManager.User(data, um)

Fields assigned by the constructor: data, id, password, salt, sessions, username. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

plugins.UserManager.User.__init__(self, data, um)

Source line 10672

ParameterPassing conventionDefault / required
datapositional or keywordrequired
umpositional or keywordrequired
plugins.UserManager.User.check_password(self, password)

Source line 10683

ParameterPassing conventionDefault / required
passwordpositional or keywordrequired
async plugins.UserManager.User.update_password(self, password)

Source line 10685

ParameterPassing conventionDefault / required
passwordpositional or keywordrequired

Declared with async def. Normal calls return an awaitable, or an async generator if the body yields. Decorated properties may be accessed differently; follow the object guide.

async plugins.UserManager.User.get_session(self, token)

Source line 10694

ParameterPassing conventionDefault / required
tokenpositional or keywordrequired

Declared with async def. Normal calls return an awaitable, or an async generator if the body yields. Decorated properties may be accessed differently; follow the object guide.

async plugins.UserManager.User.save_sessions(self)

Source line 10698

No caller-supplied parameters are declared.

Declared with async def. Normal calls return an awaitable, or an async generator if the body yields. Decorated properties may be accessed differently; follow the object guide.

async plugins.UserManager.User.add_session(self, req, extra=None)

Source line 10704

ParameterPassing conventionDefault / required
reqpositional or keywordrequired
extrapositional or keywordNone

Declared with async def. Normal calls return an awaitable, or an async generator if the body yields. Decorated properties may be accessed differently; follow the object guide.

async plugins.UserManager.User.set_username(self, username)

Source line 10721

ParameterPassing conventionDefault / required
usernamepositional or keywordrequired

Declared with async def. Normal calls return an awaitable, or an async generator if the body yields. Decorated properties may be accessed differently; follow the object guide.

class plugins.UserManager.UserSession

Source line 10724

Construct: plugins.UserManager.UserSession(base_data, u)

Fields assigned by the constructor: created, extra, ip, token, user, user_agent. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

class plugins.UserManager.UserSession.Validation

Source line 10757

Construct: plugins.UserManager.UserSession.Validation(max_duration=None, ip=None, check_user_agent=False, max_distance=None, function=None)

Fields assigned by the constructor: check_user_agent, function, ip, max_distance, max_duration. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

plugins.UserManager.UserSession.Validation.__init__(self, max_duration=None, ip=None, check_user_agent=False, max_distance=None, function=None)

Source line 10758

ParameterPassing conventionDefault / required
max_durationpositional or keywordNone
ippositional or keywordNone
check_user_agentpositional or keywordFalse
max_distancepositional or keywordNone
functionpositional or keywordNone
plugins.UserManager.UserSession.Validation.__call__(self, session, req)

Source line 10766

ParameterPassing conventionDefault / required
sessionpositional or keywordrequired
reqpositional or keywordrequired
plugins.UserManager.UserSession.__init__(self, base_data, u)

Source line 10804

ParameterPassing conventionDefault / required
base_datapositional or keywordrequired
upositional or keywordrequired
async plugins.UserManager.UserSession.delete(self)

Source line 10825

No caller-supplied parameters are declared.

Declared with async def. Normal calls return an awaitable, or an async generator if the body yields. Decorated properties may be accessed differently; follow the object guide.

plugins.UserManager.UserSession.raw_data(self)

Source line 10829

Decorators: @property

No caller-supplied parameters are declared.

plugins.UserManager.UserSession.encoded(self)

Source line 10840

Decorators: @property

No caller-supplied parameters are declared.

async plugins.UserManager.UserSession.ip_info(self)

Source line 10843

Decorators: @CachedProperty(expire=20000)

No caller-supplied parameters are declared.

Declared with async def. Normal calls return an awaitable, or an async generator if the body yields. Decorated properties may be accessed differently; follow the object guide.

async plugins.UserManager.UserSession.location(self)

Source line 10846

Decorators: @CachedProperty(expire=3600)

No caller-supplied parameters are declared.

Declared with async def. Normal calls return an awaitable, or an async generator if the body yields. Decorated properties may be accessed differently; follow the object guide.

plugins.UserManager.UserSession.time_since_created(self)

Source line 10849

Decorators: @property

No caller-supplied parameters are declared.

async plugins.UserManager.UserSession.validate(self, req)

Source line 10851

ParameterPassing conventionDefault / required
reqpositional or keywordrequired

Declared with async def. Normal calls return an awaitable, or an async generator if the body yields. Decorated properties may be accessed differently; follow the object guide.

class plugins.UserManager.MFA

Source line 10853

Construct: plugins.UserManager.MFA(data, um)

Fields assigned by the constructor: created_at, data, id, type, user_id. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

plugins.UserManager.MFA.__init__(self, data, um)

Source line 10854

ParameterPassing conventionDefault / required
datapositional or keywordrequired
umpositional or keywordrequired
async plugins.UserManager.MFA.delete(self)

Source line 10861

No caller-supplied parameters are declared.

Declared with async def. Normal calls return an awaitable, or an async generator if the body yields. Decorated properties may be accessed differently; follow the object guide.

haversine(lat1, lon1, lat2, lon2, use_miles=False)

Source line 10867

ParameterPassing conventionDefault / required
lat1positional or keywordrequired
lon1positional or keywordrequired
lat2positional or keywordrequired
lon2positional or keywordrequired
use_milespositional or keywordFalse
word_to_digit(word)

Source line 10894

ParameterPassing conventionDefault / required
wordpositional or keywordrequired
name_to_normal(name)

Source line 10926

ParameterPassing conventionDefault / required
namepositional or keywordrequired
convert_to_normal(txt)

Source line 11320

ParameterPassing conventionDefault / required
txtpositional or keywordrequired
convert_to_single_letters(txt)

Source line 11429

ParameterPassing conventionDefault / required
txtpositional or keywordrequired
equivilency_convert(txt)

Source line 11445

ParameterPassing conventionDefault / required
txtpositional or keywordrequired
class Matching

Source line 11475

No constructor is declared here. Some utility classes group functions for direct class access; use the call style shown in the guide.

Declared functions, properties, and nested objects:

class Matching.Methods

Source line 11476

No constructor is declared here. Some utility classes group functions for direct class access; use the call style shown in the guide.

Declared functions, properties, and nested objects:

Matching.Methods.levenshtein_local(s1, s2)

Source line 11477

ParameterPassing conventionDefault / required
s1positional or keywordrequired
s2positional or keywordrequired
class Matching.Settings

Source line 11498

normalize: convert to normalized form (ex. "héllô" -> "hello")
extraneous_characters: convert to single letters (ex. "hello" -> "helo")
ignore_spaces: ignore spaces (ex. "he llo" == "hello")
match_asterisk: match '*' as a wildcard (ex. "h*llo" == "hello")
fuzzy_threshold: how close (in % of characters) the strings must be to be considered a match (ex. "12345" == "12344" with threshold .8)
phonetic: convert text to a phonetic form (ex. "Derrick" == "Derrik")

Construct: Matching.Settings(normalize=True, extraneous_characters=False, ignore_spaces=False, match_asterisk=False, fuzzy_threshold=1, phonetic=False)

Fields assigned by the constructor: extraneous_characters, fuzzy_threshold, ignore_spaces, match_asterisk, normalize, phonetic. Some assignments may be conditional; see the object guide for meaning and lifecycle.

Declared functions, properties, and nested objects:

Matching.Settings.__init__(self, normalize=True, extraneous_characters=False, ignore_spaces=False, match_asterisk=False, fuzzy_threshold=1, phonetic=False)

Source line 11505

ParameterPassing conventionDefault / required
normalizepositional or keywordTrue
extraneous_characterspositional or keywordFalse
ignore_spacespositional or keywordFalse
match_asteriskpositional or keywordFalse
fuzzy_thresholdpositional or keyword1
phoneticpositional or keywordFalse
Matching.fuzzy_match(txt1, txt2, threshold=0.8)

Source line 11529

ParameterPassing conventionDefault / required
txt1positional or keywordrequired
txt2positional or keywordrequired
thresholdpositional or keyword0.8
Matching.fuzzy_within(txt1, txt2, threshold=0.8)

Source line 11539

Check if txt1 is within txt2 based on fuzzy matching
ParameterPassing conventionDefault / required
txt1positional or keywordrequired
txt2positional or keywordrequired
thresholdpositional or keyword0.8
Matching.match(txt1, txt2, settings=None)

Source line 11547

ParameterPassing conventionDefault / required
txt1positional or keywordrequired
txt2positional or keywordrequired
settingspositional or keywordNone
Matching.within(txt1, txt2, settings=None)

Source line 11585

Check if txt1 is within txt2 based on settings
ParameterPassing conventionDefault / required
txt1positional or keywordrequired
txt2positional or keywordrequired
settingspositional or keywordNone