Skip to content

Commit fb03eae

Browse files
lanbytescursoragent
andcommitted
Add Speakeasy-generated TwexAPI Python SDK.
Give Python apps the same typed search, follower, DM, and automation surface as the TypeScript and Ruby SDKs. Co-authored-by: Cursor <cursoragent@cursor.com>
0 parents  commit fb03eae

364 files changed

Lines changed: 47187 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# This allows generated code to be indexed correctly
2+
*.py linguist-generated=false
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Generate
2+
permissions:
3+
checks: write
4+
contents: write
5+
pull-requests: write
6+
statuses: write
7+
on:
8+
workflow_dispatch:
9+
inputs:
10+
force:
11+
description: Force generation of SDKs
12+
type: boolean
13+
default: false
14+
set_version:
15+
description: Optional version to force for generation
16+
type: string
17+
schedule:
18+
- cron: 0 0 * * *
19+
jobs:
20+
generate:
21+
uses: speakeasy-api/sdk-generation-action/.github/workflows/workflow-executor.yaml@v15
22+
with:
23+
speakeasy_version: latest
24+
force: ${{ github.event.inputs.force }}
25+
mode: pr
26+
set_version: ${{ github.event.inputs.set_version }}
27+
secrets:
28+
github_access_token: ${{ secrets.GITHUB_TOKEN }}
29+
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
30+
pypi_token: ${{ secrets.PYPI_TOKEN }}

.github/workflows/sdk_publish.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Publish
2+
permissions:
3+
checks: write
4+
contents: write
5+
pull-requests: write
6+
statuses: write
7+
on:
8+
push:
9+
branches:
10+
- main
11+
paths:
12+
- .speakeasy/gen.lock
13+
workflow_dispatch:
14+
jobs:
15+
publish:
16+
uses: speakeasy-api/sdk-generation-action/.github/workflows/sdk-publish.yaml@v15
17+
with:
18+
create_release: true
19+
secrets:
20+
github_access_token: ${{ secrets.GITHUB_TOKEN }}
21+
speakeasy_api_key: ${{ secrets.SPEAKEASY_API_KEY }}
22+
pypi_token: ${{ secrets.PYPI_TOKEN }}

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.venv/
2+
venv/
3+
src/*.egg-info/
4+
**/__pycache__/
5+
.pytest_cache/
6+
.python-version
7+
.DS_Store
8+
pyrightconfig.json
9+
**/.speakeasy/temp/
10+
**/.speakeasy/logs/
11+
.speakeasy/reports
12+
.speakeasy/out.openapi.yaml
13+
.env
14+
.env.local

.speakeasy/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
logs/
2+
temp/
3+
reports/

.speakeasy/gen.lock

Lines changed: 1433 additions & 0 deletions
Large diffs are not rendered by default.

.speakeasy/gen.yaml

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
configVersion: 2.0.0
2+
generation:
3+
sdkClassName: XapiScraper
4+
maintainOpenAPIOrder: true
5+
usageSnippets:
6+
optionalPropertyRendering: withExample
7+
sdkInitStyle: constructor
8+
useClassNamesForArrayFields: true
9+
fixes:
10+
nameResolutionDec2023: true
11+
nameResolutionFeb2025: true
12+
parameterOrderingFeb2024: true
13+
requestResponseComponentNamesFeb2024: true
14+
securityFeb2025: true
15+
sharedErrorComponentsApr2025: true
16+
sharedNestedComponentsJan2026: true
17+
nameOverrideFeb2026: true
18+
auth:
19+
oAuth2ClientCredentialsEnabled: true
20+
oAuth2PasswordEnabled: true
21+
hoistGlobalSecurity: true
22+
inferSSEOverload: true
23+
sdkHooksConfigAccess: true
24+
schemas:
25+
allOfMergeStrategy: shallowMerge
26+
requestBodyFieldName: body
27+
versioningStrategy: manual
28+
persistentEdits: {}
29+
tests:
30+
generateTests: true
31+
generateNewTests: true
32+
skipResponseBodyAssertions: true
33+
repoUrl: https://github.com/twexapi-dev/x-api-scraper-python
34+
python:
35+
version: 0.1.0
36+
additionalDependencies:
37+
dev: {}
38+
main: {}
39+
allowedRedefinedBuiltins:
40+
- id
41+
- object
42+
- input
43+
- dir
44+
asyncMode: both
45+
authors:
46+
- TwexAPI
47+
baseErrorName: XapiScraperError
48+
bodyVariantOverloads: false
49+
clientServerStatusCodesAsErrors: true
50+
constFieldCasing: normal
51+
defaultErrorName: XapiScraperDefaultError
52+
description: Twitter API alternative Python SDK for tweet search, follower scraping, timelines, DMs, communities, lists, trending, and X automation. Not affiliated with X Corp.
53+
documentationUrl: https://docs.twexapi.io
54+
durationFormat: true
55+
enableCustomCodeRegions: false
56+
enumFormat: union
57+
envVarPrefix: X_API_SCRAPER
58+
errorSchemaValidation: true
59+
eventStreamClassNames:
60+
async: EventStreamAsync
61+
sync: EventStream
62+
fixFlags:
63+
asyncPaginationSep2025: true
64+
conflictResistantModelImportsFeb2026: true
65+
responseRequiredSep2024: true
66+
flattenGlobalSecurity: true
67+
flattenRequests: true
68+
flatteningOrder: parameters-first
69+
forwardCompatibleEnumsByDefault: true
70+
forwardCompatibleUnionsByDefault: tagged-only
71+
homepage: https://twexapi.io
72+
httpClientLibrary: httpx
73+
imports:
74+
option: openapi
75+
paths:
76+
callbacks: ""
77+
errors: errors
78+
operations: ""
79+
shared: ""
80+
webhooks: ""
81+
inferUnionDiscriminators: true
82+
inputModelSuffix: input
83+
inputTypedDictSuffix: TypedDict
84+
license: MIT
85+
maxMethodParams: 999
86+
methodArguments: infer-optional-args
87+
methodTimeoutArgument: timeout-ms
88+
methodTimeoutUnits: milliseconds
89+
moduleName: x_api_scraper
90+
multipartArrayFormat: standard
91+
optionalDependencies: {}
92+
outputModelSuffix: output
93+
packageManager: uv
94+
packageName: x_api_scraper
95+
preApplyUnionDiscriminators: true
96+
pytestFilterWarnings: []
97+
pytestTimeout: 0
98+
rawResponseHelpers: false
99+
responseFormat: flat
100+
responseSchemaValidation: true
101+
sseFlatResponse: false
102+
templateVersion: v2
103+
useAsyncHooks: false
104+
uuidFormat: false

.speakeasy/tests.arazzo.yaml

Lines changed: 1290 additions & 0 deletions
Large diffs are not rendered by default.

.speakeasy/workflow.lock

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
speakeasyVersion: 1.795.1
2+
sources:
3+
X API Scraper:
4+
sourceNamespace: x-api-scraper
5+
sourceRevisionDigest: sha256:f8060dbd014f0f4bc1db1a027bcec3334dabc2fe86e5fea950aa4632275be18f
6+
sourceBlobDigest: sha256:6e013e2ccb496e995907ac9004c6b8f922022360569ad08af4ad9399b7203d88
7+
tags:
8+
- latest
9+
- 1.0.0
10+
x-api-scraper:
11+
sourceNamespace: x-api-scraper
12+
sourceRevisionDigest: sha256:4c2219a33c1368f6023c6ff6f493dd8994a426fbf2d49b20c63d0dc0a51ef6b1
13+
sourceBlobDigest: sha256:0185b157502bb647f45328368fa002d4761d1de66b10dfb3285a7155e285ef16
14+
tags:
15+
- latest
16+
- 1.0.0
17+
targets:
18+
python:
19+
source: x-api-scraper
20+
sourceNamespace: x-api-scraper
21+
sourceRevisionDigest: sha256:4c2219a33c1368f6023c6ff6f493dd8994a426fbf2d49b20c63d0dc0a51ef6b1
22+
sourceBlobDigest: sha256:0185b157502bb647f45328368fa002d4761d1de66b10dfb3285a7155e285ef16
23+
codeSamplesNamespace: x-api-scraper-python-code-samples
24+
codeSamplesRevisionDigest: sha256:f8ebda10131eaea99a43cbc37b8c5c1a69ee186976d36ad2b4d15e84bd1bae74
25+
xapi-scraper:
26+
source: X API Scraper
27+
sourceNamespace: x-api-scraper
28+
sourceRevisionDigest: sha256:f8060dbd014f0f4bc1db1a027bcec3334dabc2fe86e5fea950aa4632275be18f
29+
sourceBlobDigest: sha256:6e013e2ccb496e995907ac9004c6b8f922022360569ad08af4ad9399b7203d88
30+
codeSamplesNamespace: x-api-scraper-python-code-samples
31+
codeSamplesRevisionDigest: sha256:4bdab72a7a5d71511694edb3dd967db2a7dcc9ec968c67bedcd9f1e2e9c7c399
32+
workflow:
33+
workflowVersion: 1.0.0
34+
speakeasyVersion: latest
35+
sources:
36+
x-api-scraper:
37+
inputs:
38+
- location: ./openapi.sdk.json
39+
registry:
40+
location: registry.speakeasyapi.dev/twexapi/sdk/x-api-scraper
41+
targets:
42+
python:
43+
target: python
44+
source: x-api-scraper
45+
codeSamples:
46+
registry:
47+
location: registry.speakeasyapi.dev/twexapi/sdk/x-api-scraper-python-code-samples
48+
labelOverride:
49+
fixedValue: Python (SDK)
50+
blocking: false

.speakeasy/workflow.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
workflowVersion: 1.0.0
2+
speakeasyVersion: latest
3+
sources:
4+
x-api-scraper:
5+
inputs:
6+
- location: ./openapi.sdk.json
7+
registry:
8+
location: registry.speakeasyapi.dev/twexapi/sdk/x-api-scraper
9+
targets:
10+
python:
11+
target: python
12+
source: x-api-scraper
13+
codeSamples:
14+
registry:
15+
location: registry.speakeasyapi.dev/twexapi/sdk/x-api-scraper-python-code-samples
16+
labelOverride:
17+
fixedValue: Python (SDK)
18+
blocking: false

0 commit comments

Comments
 (0)