TextSharer
Sub classes¶
| Name | Children | Inherits |
|---|---|---|
| GistSharer anyenv.text_sharing.github_gist Share text via GitHub Gists. |
||
| OpenCodeSharer anyenv.text_sharing.opencode OpenCode text sharing service. |
||
| PasteRsSharer anyenv.text_sharing.paste_rs Share text via paste.rs. |
||
| PastebinSharer anyenv.text_sharing.pastebin Share text via Pastebin.com. |
||
| ShittyCodingAgentSharer anyenv.text_sharing.shittycodingagent Share text via GitHub Gists with shittycodingagent.ai preview URL. |
Base classes¶
| Name | Children | Inherits |
|---|---|---|
| ABC abc Helper class that provides a standard way to create an ABC using |
⋔ Inheritance diagram¶
graph TD
2782231920["base.TextSharer"]
925645236["abc.ABC"]
2751680898["builtins.object"]
925645236 --> 2782231920
2751680898 --> 925645236
🛈 DocStrings¶
Bases: ABC
Base class for text sharing services.
Source code in src/anyenv/text_sharing/base.py
share
abstractmethod
async
¶
share(
content: str,
*,
title: str | None = None,
syntax: str | None = None,
visibility: Visibility = "unlisted",
expires_in: int | None = None,
) -> ShareResult
Share text content.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
content
|
str
|
The text content to share |
required |
title
|
str | None
|
Optional title/filename for the content |
None
|
syntax
|
str | None
|
Syntax highlighting hint (e.g. "python", "markdown") |
None
|
visibility
|
Visibility
|
Visibility level (not all providers support all levels) |
'unlisted'
|
expires_in
|
int | None
|
Expiration time in seconds (not supported by all providers) |
None
|
Returns:
| Type | Description |
|---|---|
ShareResult
|
ShareResult with URL and metadata |
share_sync
¶
share_sync(
content: str,
*,
title: str | None = None,
syntax: str | None = None,
visibility: Visibility = "unlisted",
expires_in: int | None = None,
) -> ShareResult