github_gist
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| GistSharer anyenv.text_sharing.github_gist Share text via GitHub Gists. |
🛈 DocStrings¶
GitHub Gist text sharing provider.
GistSharer
¶
Bases: TextSharer
Share text via GitHub Gists.
Source code in src/anyenv/text_sharing/github_gist.py
__init__
¶
share
async
¶
share(
content: str,
*,
title: str | None = None,
syntax: str | None = None,
visibility: Visibility = "unlisted",
expires_in: int | None = None,
) -> ShareResult
Share content as a GitHub Gist.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
content
|
str
|
The text content to share |
required |
title
|
str | None
|
Filename for the gist (defaults to "shared.txt" or "shared.{syntax}") |
None
|
syntax
|
str | None
|
File extension hint (e.g. "py", "md") |
None
|
visibility
|
Visibility
|
"public" or "unlisted" (private not supported) |
'unlisted'
|
expires_in
|
int | None
|
Ignored (gists don't expire) |
None
|
main
async
¶
Example usage of the GistSharer class.