Welcome to Pibrary’s documentation!
API Reference
This page contains auto-generated API reference documentation [1].
pibrary
Submodules
pibrary.file
Module Contents
Classes
Class to read and write files. |
- class pibrary.file.File(path: str, *args, **kwargs)[source]
Class to read and write files.
- read() File [source]
Sets the io mode to read, and path variable to read from.
Returns: Class object to chain with other methods.
- write(obj_file: Any) File [source]
Sets the io mode to write, and path variable to write to.
- Parameters:
obj_file – Object to save like dict for j
Returns: Class object to chain with other methods.
- json(**kwargs) Optional[Dict[str, List[str]]] [source]
Reads or writes json file according to mode set by read/write method.
- Parameters:
**kwargs – Keyword arguments for diff read/write like. Eg:nt=4 for json read.
Returns: obj_file if read mode else nothing is returned.
pibrary.logger
Module Contents
Functions
|
Calculates the time taken by the function to run. |
pibrary.string
Module Contents
Classes
This class is used to preprocess a text. |
- class pibrary.string.String(seq)[source]
Bases:
collections.UserString
This class is used to preprocess a text.
- property str: str[source]
Property to get the string of the text.
- Returns:
String of the text.
- Return type:
str
- remove_punctuation_except_period() collections.UserString [source]
Remove punctuation except period from a text.
- Returns:
Text without punctuation except period.
- Return type:
UserString
- remove_punctuation() collections.UserString [source]
Remove punctuation from a text.
- Returns:
Text without punctuation.
- Return type:
UserString