fs
URI
mypygui.core.fs.uri.URI
URI.Schema
URI.Schema
Enum (static)
Currently recognized Schemas are
- file
- http
- https
URI.schema
URI.schema
The schema of the uri
URI.host
URI.host
str
The host of the uri
URI.path
URI.path
pathlib.Path
The path pertaining to the uri
URI.queries
URI.queries
list[str]
Queries in the uri
URI.fragment
URI.fragment
str
Fragments of the uri
URI.parent
URI.parent
The parent of the uri
URI.make
URI.make
( ) -> URI
Creates a new uri relative to the current uri
NOTE: This function keeps in mind that http and file uris have to be handled differently
NOTE: This function is used by mypygui to handle urls present in the html
Parameters:
The uri that was made (a uri relative to the current one)
NOTE: This function keeps in mind that http and file uris have to be handled differently
NOTE: This function is used by mypygui to handle urls present in the html
Parameters:
-
uri_string : str
The uri_string (or partial uri string in the case of local url)
The uri that was made (a uri relative to the current one)
URI.join
URI.join
(*parts) → URI
Creates a new uri based on the parts given
Parameters:
The joined URI
Parameters:
-
*parts : [...str]
The joined URI
URI.to_string
URI.to_string
( ) → str
Converts the uri to a string
URI.from_uri_string
URI.from_uri_string
classmethod (uri, _resolve_path?) → URI
Forms the uri using a string
Parameters:
A uri from the string
Parameters:
-
uri : str
The string representation of the uri -
_resolve_path : bool
Resolves the path of the given uri if set to true (False by default )
A uri from the string
URI.from_local_path_string
URI.from_local_path_string
classmethod (path) → URI
Forms a uri using a path to the given local resource
NOTE: The paths must be absolute paths
Parameters:
A uri from the string
NOTE: The paths must be absolute paths
Parameters:
-
path : str
The absolute path
A uri from the string
Reading
mypygui.core.asynchronous.fs.reading
FileType
FileType
Enum
Currently recognized filetypes are
- text
- bytes
load
load
(uri, file_type?) → any
load_web
load_web
(uri, file_type?) → any
load_local
load_local
(uri, file_type?) → any