Flags

Details

class GLib.AsciiType(value)

Bases: GLib.Flags

ALNUM = 1
XDIGIT = 1024
PUNCT = 128
GRAPH = 16
ALPHA = 2
SPACE = 256
LOWER = 32
CNTRL = 4
UPPER = 512
PRINT = 64
DIGIT = 8
class GLib.FileSetContentsFlags(value)

Bases: GLib.Flags

Flags to pass to GLib.file_set_contents_full() to affect its safety and performance.

New in version 2.66.

NONE = 0

No guarantees about file consistency or durability. The most dangerous setting, which is slightly faster than other settings.

CONSISTENT = 1

Guarantee file consistency: after a crash, either the old version of the file or the new version of the file will be available, but not a mixture. On Unix systems this equates to an fsync() on the file and use of an atomic rename() of the new version of the file over the old.

DURABLE = 2

Guarantee file durability: after a crash, the new version of the file will be available. On Unix systems this equates to an fsync() on the file (if GLib.FileSetContentsFlags.CONSISTENT is unset), or the effects of GLib.FileSetContentsFlags.CONSISTENT plus an fsync() on the directory containing the file after calling rename().

ONLY_EXISTING = 4

Only apply consistency and durability guarantees if the file already exists. This may speed up file operations if the file doesn’t currently exist, but may result in a corrupted version of the new file if the system crashes while writing it.

class GLib.FileTest(value)

Bases: GLib.Flags

A test to perform on a file using GLib.file_test().

IS_REGULAR = 1

True if the file is a regular file (not a directory). Note that this test will also return True if the tested file is a symlink to a regular file.

EXISTS = 16

True if the file exists. It may or may not be a regular file.

True if the file is a symlink.

IS_DIR = 4

True if the file is a directory.

IS_EXECUTABLE = 8

True if the file is executable.

class GLib.Flags(value)

Base type for all flags types

Parameters:

value (int) –

class GLib.FormatSizeFlags(value)

Bases: GLib.Flags

Flags to modify the format of the string returned by GLib.format_size_full().

DEFAULT = 0

behave the same as GLib.format_size()

LONG_FORMAT = 1

include the exact number of bytes as part of the returned string. For example, “45.6 kB (45,612 bytes)”.

ONLY_UNIT = 16

return only unit, without value; this should not be used together with GLib.FormatSizeFlags.LONG_FORMAT nor GLib.FormatSizeFlags.ONLY_VALUE.

New in version 2.74.

IEC_UNITS = 2

use IEC (base 1024) units with “KiB”-style suffixes. IEC units should only be used for reporting things with a strong “power of 2” basis, like RAM sizes or RAID stripe sizes. Network and storage sizes should be reported in the normal SI units.

BITS = 4

set the size as a quantity in bits, rather than bytes, and return units in bits. For example, ‘Mbit’ rather than ‘MB’.

ONLY_VALUE = 8

return only value, without unit; this should not be used together with GLib.FormatSizeFlags.LONG_FORMAT nor GLib.FormatSizeFlags.ONLY_UNIT.

New in version 2.74.

class GLib.HookFlagMask(value)

Bases: GLib.Flags

Flags used internally in the GLib.Hook implementation.

ACTIVE = 1

set if the hook has not been destroyed

MASK = 15

A mask covering all bits reserved for hook flags; see GLib.HOOK_FLAG_USER_SHIFT

IN_CALL = 2

set if the hook is currently being run

class GLib.IOCondition(value)

Bases: GObject.GFlags

A bitwise combination representing a condition to watch for on an event source.

IN = 1

There is data to read.

HUP = 16

Hung up (the connection has been broken, usually for pipes and sockets).

PRI = 2

There is urgent data to read.

NVAL = 32

Invalid request. The file descriptor is not open.

OUT = 4

Data can be written (without blocking).

ERR = 8

Error condition.

class GLib.IOFlags(value)

Bases: GLib.Flags

Specifies properties of a GLib.IOChannel. Some of the flags can only be read with GLib.IOChannel.get_flags(), but not changed with GLib.IOChannel.set_flags().

NONE = 0

no special flags set.

New in version 2.74.

APPEND = 1

turns on append mode, corresponds to %O_APPEND (see the documentation of the UNIX open() syscall)

IS_SEEKABLE = 16

indicates that the io channel is seekable, i.e. that GLib.IOChannel.seek_position() can be used on it. This flag cannot be changed.

NONBLOCK = 2

turns on nonblocking mode, corresponds to %O_NONBLOCK/%O_NDELAY (see the documentation of the UNIX open() syscall)

SET_MASK = 3

the mask of the flags that the user can modify with GLib.IOChannel.set_flags()

GET_MASK = 31

the mask of the flags that are returned from GLib.IOChannel.get_flags()

MASK = 31

the mask that specifies all the valid flags.

IS_READABLE = 4

indicates that the io channel is readable. This flag cannot be changed.

IS_WRITABLE = 8

indicates that the io channel is writable. This flag cannot be changed.

IS_WRITEABLE = 8

a misspelled version of GLib.IOFlags.IS_WRITABLE that existed before the spelling was fixed in GLib 2.30. It is kept here for compatibility reasons. Deprecated since 2.30

class GLib.KeyFileFlags(value)

Bases: GLib.Flags

Flags which influence the parsing.

NONE = 0

No flags, default behaviour

KEEP_COMMENTS = 1

Use this flag if you plan to write the (possibly modified) contents of the key file back to a file; otherwise all comments will be lost when the key file is written back.

KEEP_TRANSLATIONS = 2

Use this flag if you plan to write the (possibly modified) contents of the key file back to a file; otherwise only the translations for the current language will be written back.

class GLib.LogLevelFlags(value)

Bases: GLib.Flags

Flags specifying the level of log messages.

It is possible to change how GLib treats messages of the various levels using [func`GLib`.log_set_handler] and [func`GLib`.log_set_fatal_mask].

LEVEL_MASK = -4

a mask including all log levels

FLAG_RECURSION = 1

internal flag

LEVEL_DEBUG = 128

log level for debug messages, see [func`GLib`.debug]

LEVEL_WARNING = 16

log level for warnings, see [func`GLib`.warning]

FLAG_FATAL = 2

internal flag

LEVEL_MESSAGE = 32

log level for messages, see [func`GLib`.message]

LEVEL_ERROR = 4

log level for errors, see [func`GLib`.error]. This level is also used for messages produced by [func`GLib`.assert].

LEVEL_INFO = 64

log level for informational messages, see [func`GLib`.info]

LEVEL_CRITICAL = 8

log level for critical warning messages, see [func`GLib`.critical]. This level is also used for messages produced by [func`GLib`.return_if_fail] and [func`GLib`.return_val_if_fail].

class GLib.MainContextFlags(value)

Bases: GLib.Flags

Flags to pass to GLib.MainContext.new_with_flags() which affect the behaviour of a GLib.MainContext.

New in version 2.72.

NONE = 0

Default behaviour.

OWNERLESS_POLLING = 1

Assume that polling for events will free the thread to process other jobs. That’s useful if you’re using g_main_context_{prepare,query,check,dispatch} to integrate GLib.MainContext in other event loops.

class GLib.MarkupCollectType(value)

Bases: GLib.Flags

A mixed enumerated type and flags field. You must specify one type (string, strdup, boolean, tristate). Additionally, you may optionally bitwise OR the type with the flag GLib.MarkupCollectType.OPTIONAL.

It is likely that this enum will be extended in the future to support other types.

INVALID = 0

used to terminate the list of attributes to collect

STRING = 1

collect the string pointer directly from the attribute_values[] array. Expects a parameter of type (const str **). If GLib.MarkupCollectType.OPTIONAL is specified and the attribute isn’t present then the pointer will be set to None

STRDUP = 2

as with GLib.MarkupCollectType.STRING, but expects a parameter of type (str **) and GLib.strdup()s the returned pointer. The pointer must be freed with GLib.free()

BOOLEAN = 3

expects a parameter of type (bool *) and parses the attribute value as a boolean. Sets False if the attribute isn’t present. Valid boolean values consist of (case-insensitive) “false”, “f”, “no”, “n”, “0” and “true”, “t”, “yes”, “y”, “1”

TRISTATE = 4

as with GLib.MarkupCollectType.BOOLEAN, but in the case of a missing attribute a value is set that compares equal to neither False nor True GLib.MarkupCollectType.OPTIONAL is implied

OPTIONAL = 65536

can be bitwise ORed with the other fields. If present, allows the attribute not to appear. A default value is set depending on what value type is used

class GLib.MarkupParseFlags(value)

Bases: GLib.Flags

Flags that affect the behaviour of the parser.

DEFAULT_FLAGS = 0

No special behaviour.

New in version 2.74.

DO_NOT_USE_THIS_UNSUPPORTED_FLAG = 1

flag you should not use

TREAT_CDATA_AS_TEXT = 2

When this flag is set, CDATA marked sections are not passed literally to the passthrough function of the parser. Instead, the content of the section (without the </literal> and <literal>) is passed to the text function. This flag was added in GLib 2.12

PREFIX_ERROR_POSITION = 4

Normally errors caught by GMarkup itself have line/column information prefixed to them to let the caller know the location of the error. When this flag is set the location information is also prefixed to errors generated by the GLib.MarkupParser implementation functions

IGNORE_QUALIFIED = 8

Ignore (don’t report) qualified attributes and tags, along with their contents. A qualified attribute or tag is one that contains ‘:’ in its name (ie: is in another namespace).

New in version 2.40.

class GLib.OptionFlags(value)

Bases: GLib.Flags

Flags which modify individual options.

NONE = 0

No flags.

New in version 2.42.

HIDDEN = 1

The option doesn’t appear in --help output.

FILENAME = 16

For options of the GLib.OptionArg.CALLBACK kind, this flag indicates that the argument should be passed to the callback in the GLib filename encoding rather than UTF-8.

New in version 2.8.

IN_MAIN = 2

The option appears in the main section of the --help output, even if it is defined in a group.

OPTIONAL_ARG = 32

For options of the GLib.OptionArg.CALLBACK kind, this flag indicates that the argument supply is optional. If no argument is given then data of GLib.OptionParseFunc will be set to None.

New in version 2.8.

REVERSE = 4

For options of the GLib.OptionArg.NONE kind, this flag indicates that the sense of the option is reversed. i.e. False will be stored into the argument rather than True.

NOALIAS = 64

This flag turns off the automatic conflict resolution which prefixes long option names with groupname- if there is a conflict. This option should only be used in situations where aliasing is necessary to model some legacy commandline interface. It is not safe to use this option, unless all option groups are under your direct control.

New in version 2.8.

NO_ARG = 8

For options of the GLib.OptionArg.CALLBACK kind, this flag indicates that the callback does not take any argument (like a GLib.OptionArg.NONE option).

New in version 2.8.

class GLib.RegexCompileFlags(value)

Bases: GLib.Flags

Flags specifying compile-time options.

New in version 2.14.

DEFAULT = 0

No special options set.

New in version 2.74.

CASELESS = 1

Letters in the pattern match both upper- and lowercase letters. This option can be changed within a pattern by a “(?i)” option setting.

NEWLINE_CR = 1048576

Usually any newline character or character sequence is recognized. If this option is set, the only recognized newline character is ‘\r’.

ANCHORED = 16

The pattern is forced to be “anchored”, that is, it is constrained to match only at the first matching point in the string that is being searched. This effect can also be achieved by appropriate constructs in the pattern itself such as the “^” metacharacter.

MULTILINE = 2

By default, GLib.Regex treats the strings as consisting of a single line of characters (even if it actually contains newlines). The “start of line” metacharacter (“^”) matches only at the start of the string, while the “end of line” metacharacter (“$”) matches only at the end of the string, or before a terminating newline (unless GLib.RegexCompileFlags.DOLLAR_ENDONLY is set). When GLib.RegexCompileFlags.MULTILINE is set, the “start of line” and “end of line” constructs match immediately following or immediately before any newline in the string, respectively, as well as at the very start and end. This can be changed within a pattern by a “(?m)” option setting.

RAW = 2048

Usually strings must be valid UTF-8 strings, using this flag they are considered as a raw sequence of bytes.

NEWLINE_LF = 2097152

Usually any newline character or character sequence is recognized. If this option is set, the only recognized newline character is ‘\n’.

FIRSTLINE = 262144

Limits an unanchored pattern to match before (or at) the first newline.

New in version 2.34.

NEWLINE_CRLF = 3145728

Usually any newline character or character sequence is recognized. If this option is set, the only recognized newline character sequence is ‘\r\n’.

DOLLAR_ENDONLY = 32

A dollar metacharacter (“$”) in the pattern matches only at the end of the string. Without this option, a dollar also matches immediately before the final character if it is a newline (but not before any other newlines). This option is ignored if GLib.RegexCompileFlags.MULTILINE is set.

JAVASCRIPT_COMPAT = 33554432

Changes behaviour so that it is compatible with JavaScript rather than PCRE. Since GLib 2.74 this is no longer supported, as libpcre2 does not support it. Since: 2.34 Deprecated: 2.74

DOTALL = 4

A dot metacharacter (“.”) in the pattern matches all characters, including newlines. Without it, newlines are excluded. This option can be changed within a pattern by a (“?s”) option setting.

NO_AUTO_CAPTURE = 4096

Disables the use of numbered capturing parentheses in the pattern. Any opening parenthesis that is not followed by “?” behaves as if it were followed by “?:” but named parentheses can still be used for capturing (and they acquire numbers in the usual way).

UNGREEDY = 512

Inverts the “greediness” of the quantifiers so that they are not greedy by default, but become greedy if followed by “?”. It can also be set by a “(?U)” option setting within the pattern.

DUPNAMES = 524288

Names used to identify capturing subpatterns need not be unique. This can be helpful for certain types of pattern when it is known that only one instance of the named subpattern can ever be matched.

NEWLINE_ANYCRLF = 5242880

Usually any newline character or character sequence is recognized. If this option is set, the only recognized newline character sequences are ‘\r’, ‘\n’, and ‘\r\n’.

New in version 2.34.

EXTENDED = 8

Whitespace data characters in the pattern are totally ignored except when escaped or inside a character class. Whitespace does not include the VT character (code 11). In addition, characters between an unescaped “#” outside a character class and the next newline character, inclusive, are also ignored. This can be changed within a pattern by a “(?x)” option setting.

OPTIMIZE = 8192

Since 2.74 and the port to pcre2, requests JIT compilation, which, if the just-in-time compiler is available, further processes a compiled pattern into machine code that executes much faster. However, it comes at the cost of extra processing before the match is performed, so it is most beneficial to use this when the same compiled pattern is used for matching many times. Before 2.74 this option used the built-in non-JIT optimizations in pcre1.

BSR_ANYCRLF = 8388608

Usually any newline character or character sequence is recognised. If this option is set, then “\R” only recognizes the newline characters ‘\r’, ‘\n’ and ‘\r\n’.

New in version 2.34.

class GLib.RegexMatchFlags(value)

Bases: GLib.Flags

Flags specifying match-time options.

New in version 2.14.

DEFAULT = 0

No special options set.

New in version 2.74.

NOTEMPTY = 1024

An empty string is not considered to be a valid match if this option is set. If there are alternatives in the pattern, they are tried. If all the alternatives match the empty string, the entire match fails. For example, if the pattern “a?b?” is applied to a string not beginning with “a” or “b”, it matches the empty string at the start of the string. With this flag set, this match is not valid, so GLib.Regex searches further into the string for occurrences of “a” or “b”.

NEWLINE_CR = 1048576

Overrides the newline definition set when creating a new GLib.Regex, setting the ‘\r’ character as line terminator.

NOTBOL = 128

Specifies that first character of the string is not the beginning of a line, so the circumflex metacharacter should not match before it. Setting this without GLib.RegexCompileFlags.MULTILINE (at compile time) causes circumflex never to match. This option affects only the behaviour of the circumflex metacharacter, it does not affect “\A”.

PARTIAL_HARD = 134217728

Turns on the partial matching feature. In contrast to to GLib.RegexMatchFlags.PARTIAL_SOFT, this stops matching as soon as a partial match is found, without continuing to search for a possible complete match. See GLib.MatchInfo.is_partial_match() for more information.

New in version 2.34.

ANCHORED = 16

The pattern is forced to be “anchored”, that is, it is constrained to match only at the first matching point in the string that is being searched. This effect can also be achieved by appropriate constructs in the pattern itself such as the “^” metacharacter.

BSR_ANY = 16777216

Overrides the newline definition for “\R” set when creating a new GLib.Regex; any Unicode newline character or character sequence are recognized as a newline by “\R”. These are ‘\r’, ‘\n’ and ‘\rn’, and the single characters U+000B LINE TABULATION, U+000C FORM FEED (FF), U+0085 NEXT LINE (NEL), U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR.

New in version 2.34.

NEWLINE_LF = 2097152

Overrides the newline definition set when creating a new GLib.Regex, setting the ‘\n’ character as line terminator.

NOTEOL = 256

Specifies that the end of the subject string is not the end of a line, so the dollar metacharacter should not match it nor (except in multiline mode) a newline immediately before it. Setting this without GLib.RegexCompileFlags.MULTILINE (at compile time) causes dollar never to match. This option affects only the behaviour of the dollar metacharacter, it does not affect “\Z” or “\z”.

NOTEMPTY_ATSTART = 268435456

Like GLib.RegexMatchFlags.NOTEMPTY, but only applied to the start of the matched string. For anchored patterns this can only happen for pattern containing “\K”.

New in version 2.34.

NEWLINE_CRLF = 3145728

Overrides the newline definition set when creating a new GLib.Regex, setting the ‘\r\n’ characters sequence as line terminator.

PARTIAL = 32768

Turns on the partial matching feature, for more documentation on partial matching see GLib.MatchInfo.is_partial_match().

PARTIAL_SOFT = 32768

An alias for GLib.RegexMatchFlags.PARTIAL.

New in version 2.34.

NEWLINE_ANY = 4194304

Overrides the newline definition set when creating a new GLib.Regex, any Unicode newline sequence is recognised as a newline. These are ‘\r’, ‘\n’ and ‘\rn’, and the single characters U+000B LINE TABULATION, U+000C FORM FEED (FF), U+0085 NEXT LINE (NEL), U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR.

NEWLINE_ANYCRLF = 5242880

Overrides the newline definition set when creating a new GLib.Regex; any ‘\r’, ‘\n’, or ‘\r\n’ character sequence is recognized as a newline.

New in version 2.34.

BSR_ANYCRLF = 8388608

Overrides the newline definition for “\R” set when creating a new GLib.Regex; only ‘\r’, ‘\n’, or ‘\r\n’ character sequences are recognized as a newline by “\R”.

New in version 2.34.

class GLib.SpawnFlags(value)

Bases: GLib.Flags

Flags passed to GLib.spawn_sync(), GLib.spawn_async() and GLib.spawn_async_with_pipes().

DEFAULT = 0

no flags, default behaviour

LEAVE_DESCRIPTORS_OPEN = 1

the parent’s open file descriptors will be inherited by the child; otherwise all descriptors except stdin, stdout and stderr will be closed before calling exec() in the child.

CHILD_INHERITS_STDERR = 1024

The child will inherit the parent’s standard error.

New in version 2.74.

SEARCH_PATH_FROM_ENVP = 128

if argv[0] is not an absolute path, it will be looked for in the PATH from the passed child environment.

New in version 2.34.

STDERR_TO_DEV_NULL = 16

the child’s standard error will be discarded.

DO_NOT_REAP_CHILD = 2

the child will not be automatically reaped; you must use GLib.child_watch_add() yourself (or call waitpid() or handle SIGCHLD yourself), or the child will become a zombie.

STDIN_FROM_DEV_NULL = 2048

The child’s standard input is attached to /dev/null.

New in version 2.74.

CLOEXEC_PIPES = 256

create all pipes with the O_CLOEXEC flag set.

New in version 2.40.

CHILD_INHERITS_STDIN = 32

the child will inherit the parent’s standard input (by default, the child’s standard input is attached to /dev/null).

SEARCH_PATH = 4

argv[0] need not be an absolute path, it will be looked for in the user’s PATH.

CHILD_INHERITS_STDOUT = 512

The child will inherit the parent’s standard output.

New in version 2.74.

FILE_AND_ARGV_ZERO = 64

the first element of argv is the file to execute, while the remaining elements are the actual argument vector to pass to the file. Normally GLib.spawn_async_with_pipes() uses argv[0] as the file to execute, and passes all of argv to the child.

STDOUT_TO_DEV_NULL = 8

the child’s standard output will be discarded, instead of going to the same location as the parent’s standard output.

class GLib.TestSubprocessFlags(value)

Bases: GLib.Flags

Flags to pass to GLib.test_trap_subprocess() to control input and output.

Note that in contrast with GLib.test_trap_fork(), the default is to not show stdout and stderr.

DEFAULT = 0

Default behaviour.

New in version 2.74.

INHERIT_STDIN = 1

If this flag is given, the child process will inherit the parent’s stdin. Otherwise, the child’s stdin is redirected to /dev/null.

INHERIT_STDOUT = 2

If this flag is given, the child process will inherit the parent’s stdout. Otherwise, the child’s stdout will not be visible, but it will be captured to allow later tests with g_test_trap_assert_stdout().

INHERIT_STDERR = 4

If this flag is given, the child process will inherit the parent’s stderr. Otherwise, the child’s stderr will not be visible, but it will be captured to allow later tests with g_test_trap_assert_stderr().

class GLib.TestTrapFlags(value)

Bases: GLib.Flags

Test traps are guards around forked tests. These flags determine what traps to set.

Deprecated since version 2.38: GLib.TestTrapFlags is used only with GLib.test_trap_fork(), which is deprecated. GLib.test_trap_subprocess() uses GLib.TestSubprocessFlags.

DEFAULT = 0

Default behaviour.

New in version 2.74.

SILENCE_STDOUT = 128

Redirect stdout of the test child to /dev/null so it cannot be observed on the console during test runs. The actual output is still captured though to allow later tests with g_test_trap_assert_stdout().

SILENCE_STDERR = 256

Redirect stderr of the test child to /dev/null so it cannot be observed on the console during test runs. The actual output is still captured though to allow later tests with g_test_trap_assert_stderr().

INHERIT_STDIN = 512

If this flag is given, stdin of the child process is shared with stdin of its parent process. It is redirected to /dev/null otherwise.

class GLib.TraverseFlags(value)

Bases: GLib.Flags

Specifies which nodes are visited during several of the tree functions, including GLib.Node.traverse() and g_node_find().

LEAFS = 1

identical to GLib.TraverseFlags.LEAVES.

LEAVES = 1

only leaf nodes should be visited. This name has been introduced in 2.6, for older version use GLib.TraverseFlags.LEAFS.

NON_LEAFS = 2

identical to GLib.TraverseFlags.NON_LEAVES.

NON_LEAVES = 2

only non-leaf nodes should be visited. This name has been introduced in 2.6, for older version use GLib.TraverseFlags.NON_LEAFS.

ALL = 3

all nodes should be visited.

MASK = 3

a mask of all traverse flags.

class GLib.UriFlags(value)

Bases: GLib.Flags

Flags that describe a URI.

When parsing a URI, if you need to choose different flags based on the type of URI, you can use GLib.Uri.peek_scheme() on the URI string to check the scheme first, and use that to decide what flags to parse it with.

New in version 2.66.

NONE = 0

No flags set.

PARSE_RELAXED = 1

Parse the URI more relaxedly than the RFC 3986 grammar specifies, fixing up or ignoring common mistakes in URIs coming from external sources. This is also needed for some obscure URI schemes where ; separates the host from the path. Don’t use this flag unless you need to.

ENCODED_FRAGMENT = 128

Same as GLib.UriFlags.ENCODED, for the fragment only.

NON_DNS = 16

The host component should not be assumed to be a DNS hostname or IP address (for example, for smb URIs with NetBIOS hostnames).

HAS_PASSWORD = 2

The userinfo field may contain a password, which will be separated from the username by :.

SCHEME_NORMALIZE = 256

A scheme-based normalization will be applied. For example, when parsing an HTTP URI changing omitted path to / and omitted port to 80; and when building a URI, changing empty path to / and default port 80). This only supports a subset of known schemes.

New in version 2.68.

ENCODED_QUERY = 32

Same as GLib.UriFlags.ENCODED, for the query field only.

HAS_AUTH_PARAMS = 4

The userinfo may contain additional authentication-related parameters, which will be separated from the username and/or password by ;.

ENCODED_PATH = 64

Same as GLib.UriFlags.ENCODED, for the path only.

ENCODED = 8

When parsing a URI, this indicates that %-encoded characters in the userinfo, path, query, and fragment fields should not be decoded. (And likewise the host field if GLib.UriFlags.NON_DNS is also set.) When building a URI, it indicates that you have already %-encoded the components, and so GLib.Uri should not do any encoding itself.

class GLib.UriHideFlags(value)

Bases: GLib.Flags

Flags describing what parts of the URI to hide in GLib.Uri.to_string_partial(). Note that GLib.UriHideFlags.PASSWORD and GLib.UriHideFlags.AUTH_PARAMS will only work if the GLib.Uri was parsed with the corresponding flags.

New in version 2.66.

NONE = 0

No flags set.

USERINFO = 1

Hide the userinfo.

FRAGMENT = 16

Hide the fragment.

PASSWORD = 2

Hide the password.

AUTH_PARAMS = 4

Hide the auth_params.

QUERY = 8

Hide the query.

class GLib.UriParamsFlags(value)

Bases: GLib.Flags

Flags modifying the way parameters are handled by GLib.Uri.parse_params() and GLib.UriParamsIter.

New in version 2.66.

NONE = 0

No flags set.

CASE_INSENSITIVE = 1

Parameter names are case insensitive.

WWW_FORM = 2

Replace + with space character. Only useful for URLs on the web, using the https or http schemas.

PARSE_RELAXED = 4

See GLib.UriFlags.PARSE_RELAXED.