httpaste.model.PasteHash
- class httpaste.model.PasteHash[source]
Paste Data Hash
- __init__()
Methods
__init__
()capitalize
()Return a copy of B with only its first character capitalized (ASCII) and the rest lower-cased.
center
(width[, fillchar])Return a centered string of length width.
count
(sub[, start[, end]])Return the number of non-overlapping occurrences of subsection sub in bytes B[start:end].
decode
([encoding, errors])Decode the bytes using the codec registered for encoding.
endswith
(suffix[, start[, end]])Return True if B ends with the specified suffix, False otherwise.
expandtabs
([tabsize])Return a copy where all tab characters are expanded using spaces.
find
(sub[, start[, end]])Return the lowest index in B where subsection sub is found, such that sub is contained within B[start,end].
fromhex
()Create a bytes object from a string of hexadecimal numbers.
hex
Create a str of hexadecimal numbers from a bytes object.
index
(sub[, start[, end]])Return the lowest index in B where subsection sub is found, such that sub is contained within B[start,end].
isalnum
()Return True if all characters in B are alphanumeric and there is at least one character in B, False otherwise.
isalpha
()Return True if all characters in B are alphabetic and there is at least one character in B, False otherwise.
isascii
()Return True if B is empty or all characters in B are ASCII, False otherwise.
isdigit
()Return True if all characters in B are digits and there is at least one character in B, False otherwise.
islower
()Return True if all cased characters in B are lowercase and there is at least one cased character in B, False otherwise.
isspace
()Return True if all characters in B are whitespace and there is at least one character in B, False otherwise.
istitle
()Return True if B is a titlecased string and there is at least one character in B, i.e. uppercase characters may only follow uncased characters and lowercase characters only cased ones.
isupper
()Return True if all cased characters in B are uppercase and there is at least one cased character in B, False otherwise.
join
(iterable_of_bytes, /)Concatenate any number of bytes objects.
ljust
(width[, fillchar])Return a left-justified string of length width.
lower
()Return a copy of B with all ASCII characters converted to lowercase.
lstrip
([bytes])Strip leading bytes contained in the argument.
maketrans
(frm, to, /)Return a translation table useable for the bytes or bytearray translate method.
partition
(sep, /)Partition the bytes into three parts using the given separator.
removeprefix
(prefix, /)Return a bytes object with the given prefix string removed if present.
removesuffix
(suffix, /)Return a bytes object with the given suffix string removed if present.
replace
(old, new[, count])Return a copy with all occurrences of substring old replaced by new.
rfind
(sub[, start[, end]])Return the highest index in B where subsection sub is found, such that sub is contained within B[start,end].
rindex
(sub[, start[, end]])Return the highest index in B where subsection sub is found, such that sub is contained within B[start,end].
rjust
(width[, fillchar])Return a right-justified string of length width.
rpartition
(sep, /)Partition the bytes into three parts using the given separator.
rsplit
([sep, maxsplit])Return a list of the sections in the bytes, using sep as the delimiter.
rstrip
([bytes])Strip trailing bytes contained in the argument.
split
([sep, maxsplit])Return a list of the sections in the bytes, using sep as the delimiter.
splitlines
([keepends])Return a list of the lines in the bytes, breaking at line boundaries.
startswith
(prefix[, start[, end]])Return True if B starts with the specified prefix, False otherwise.
strip
([bytes])Strip leading and trailing bytes contained in the argument.
swapcase
()Return a copy of B with uppercase ASCII characters converted to lowercase ASCII and vice versa.
title
()Return a titlecased version of B, i.e. ASCII words start with uppercase characters, all remaining cased characters have lowercase.
translate
(table, /[, delete])Return a copy with each character mapped by the given translation table.
upper
()Return a copy of B with all ASCII characters converted to uppercase.
zfill
(width, /)Pad a numeric string with zeros on the left, to fill a field of the given width.