Skip to content

Commit 1a038e9

Browse files
author
Burak Bayır
authored
docs: tighten Python SDK copy
Remove a repeated SDK pitch, correct release citation metadata, and replace vague configuration comments. Signed-off-by: kriptoburak <kriptoburak@users.noreply.github.com>
1 parent e6d7e9e commit 1a038e9

3 files changed

Lines changed: 17 additions & 31 deletions

File tree

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ title: Xquik Python SDK for Twitter Search & X Automation
44
type: software
55
authors:
66
- name: Xquik
7-
version: 0.11.0
8-
date-released: 2026-08-12
7+
version: 0.11.1
8+
date-released: 2026-08-20
99
url: https://github.com/Xquik-dev/x-twitter-scraper-python
1010
repository-code: https://github.com/Xquik-dev/x-twitter-scraper-python
1111
license: Apache-2.0

README.md

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ It provides a Twitter API alternative through documented Xquik REST routes.
1313

1414
[Stainless](https://www.stainless.com/) generates this SDK.
1515

16-
## Choose the Python SDK
17-
18-
Choose this client for scripts, notebooks, workers, and Python services.
19-
Use sync or async resources with typed Pydantic response models.
20-
2116
## Common Twitter & X Tasks
2217

2318
Map each task to its REST route.
@@ -125,9 +120,7 @@ from x_twitter_scraper import AsyncXTwitterScraper
125120

126121
async def main() -> None:
127122
async with AsyncXTwitterScraper(
128-
api_key=os.environ.get(
129-
"X_TWITTER_SCRAPER_API_KEY"
130-
), # This is the default and can be omitted
123+
api_key=os.environ.get("X_TWITTER_SCRAPER_API_KEY"), # This is the default and can be omitted
131124
http_client=DefaultAioHttpClient(),
132125
) as client:
133126
response = await client.x.tweets.search(
@@ -282,10 +275,10 @@ Check `.model_fields_set` to distinguish them:
282275

283276
```py
284277
if response.my_field is None:
285-
if 'my_field' not in response.model_fields_set:
286-
print('The response omitted "my_field".')
287-
else:
288-
print('The response set "my_field" to null.')
278+
if "my_field" not in response.model_fields_set:
279+
print('The response omitted "my_field".')
280+
else:
281+
print('The response set "my_field" to null.')
289282
```
290283

291284
### Accessing Raw Response Data
@@ -300,7 +293,7 @@ response = client.x.tweets.with_raw_response.search(
300293
q="from:elonmusk",
301294
limit=10,
302295
)
303-
print(response.headers.get('X-My-Header'))
296+
print(response.headers.get("X-My-Header"))
304297

305298
tweet = response.parse() # Parse the regular x.tweets.search() result.
306299
print(tweet.has_next_page)
@@ -397,8 +390,8 @@ Call `.close()` or use a context manager to close them earlier.
397390
from x_twitter_scraper import XTwitterScraper
398391

399392
with XTwitterScraper() as client:
400-
# Make requests here.
401-
...
393+
# Make requests here.
394+
...
402395

403396
# The HTTP client is closed.
404397
```
@@ -420,6 +413,7 @@ Check the runtime version:
420413

421414
```py
422415
import x_twitter_scraper
416+
423417
print(x_twitter_scraper.__version__)
424418
```
425419

pyproject.toml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ conflicts = [
5757
]
5858

5959
[dependency-groups]
60-
# version pins are in uv.lock
60+
# Version pins are in uv.lock.
6161
dev = [
6262
"coverage==7.15.4",
6363
"pyright==1.1.411",
@@ -93,7 +93,7 @@ include = [
9393
packages = ["src/x_twitter_scraper"]
9494

9595
[tool.hatch.build.targets.sdist]
96-
# Basically everything except hidden files/directories (such as .github, .devcontainers, .python-version, etc)
96+
# Package non-hidden source, tests, docs, and metadata.
9797
include = [
9898
"/*.toml",
9999
"/*.json",
@@ -114,7 +114,7 @@ content-type = "text/markdown"
114114
path = "README.md"
115115

116116
[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
117-
# replace relative links with absolute links
117+
# Convert relative links to absolute links.
118118
pattern = '\[(.+?)\]\(((?!https?://)\S+?)\)'
119119
replacement = '[\1](https://github.com/Xquik-dev/x-twitter-scraper-python/tree/main/\g<2>)'
120120

@@ -129,9 +129,7 @@ filterwarnings = [
129129
]
130130

131131
[tool.pyright]
132-
# this enables practically every flag given by pyright.
133-
# there are a couple of flags that are still disabled by
134-
# default in strict mode as they are experimental and niche.
132+
# Enable Pyright's stable strict checks.
135133
typeCheckingMode = "strict"
136134
pythonVersion = "3.10"
137135

@@ -152,12 +150,7 @@ reportPrivateUsage = false
152150
pretty = true
153151
show_error_codes = true
154152

155-
# Exclude _files.py because mypy isn't smart enough to apply
156-
# the correct type narrowing and as this is an internal module
157-
# it's fine to just use Pyright.
158-
#
159-
# We also exclude our `tests` as mypy doesn't always infer
160-
# types correctly and Pyright will still catch any type errors.
153+
# Pyright checks `_files.py` and tests where mypy cannot infer types accurately.
161154
exclude = ['src/x_twitter_scraper/_files.py', '_dev/.*.py', 'tests/.*']
162155

163156
strict_equality = true
@@ -169,8 +162,7 @@ warn_return_any = true
169162
warn_unreachable = true
170163
warn_unused_configs = true
171164

172-
# Turn these options off as it could cause conflicts
173-
# with the Pyright options.
165+
# Avoid conflicts with Pyright.
174166
warn_unused_ignores = false
175167
warn_redundant_casts = false
176168

0 commit comments

Comments
 (0)