- client.py:
- Remove dead _extract_cursor second branch (unreachable code)
- Cache SSL context as module-level _SSL_CTX (avoid re-reading CA certs)
- Add 404 stale-fallback retry to _graphql_post (parity with GET)
- Remove dead core.get('name')/core.get('screen_name') in fetch_user
- Set Content-Type: application/json only for POST requests
- Rename _to_int → _parse_int for clarity vs config._as_int
- Add 'not thread-safe' note on module-level caches
- cli.py:
- _fetch_and_display now accepts optional config param (fix double load)
- Refactor user_posts to use _fetch_and_display
- Pass config to all _fetch_and_display callers
- pyproject.toml:
- Move xclienttransaction/requests to optional [transaction] deps
- Add beautifulsoup4 to [transaction] optional deps
- README.md:
- Add rateLimit config section with comments
- Add constants.py to project structure tree
63 lines
1.6 KiB
TOML
63 lines
1.6 KiB
TOML
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[project]
|
|
name = "twitter-cli"
|
|
version = "0.1.0"
|
|
description = "A CLI for Twitter/X — feed, bookmarks, and user timeline in terminal"
|
|
readme = "README.md"
|
|
license = "Apache-2.0"
|
|
requires-python = ">=3.8"
|
|
authors = [{ name = "jackwener", email = "jakevingoo@gmail.com" }]
|
|
keywords = ["twitter", "x", "cli", "feed", "timeline"]
|
|
classifiers = [
|
|
"Development Status :: 3 - Alpha",
|
|
"Environment :: Console",
|
|
"Intended Audience :: Developers",
|
|
"License :: OSI Approved :: Apache Software License",
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.8",
|
|
"Programming Language :: Python :: 3.9",
|
|
"Programming Language :: Python :: 3.10",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Programming Language :: Python :: 3.13",
|
|
"Topic :: Utilities",
|
|
]
|
|
dependencies = [
|
|
"browser-cookie3>=0.19",
|
|
"click>=8.0",
|
|
"rich>=13.0",
|
|
"PyYAML>=6.0",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
transaction = [
|
|
"xclienttransaction>=1.0.1",
|
|
"requests>=2.32.4",
|
|
"beautifulsoup4>=4.12",
|
|
]
|
|
dev = [
|
|
"pytest>=8.0",
|
|
"ruff>=0.8",
|
|
]
|
|
|
|
[project.urls]
|
|
Homepage = "https://github.com/jackwener/twitter-cli"
|
|
Repository = "https://github.com/jackwener/twitter-cli"
|
|
Issues = "https://github.com/jackwener/twitter-cli/issues"
|
|
|
|
[project.scripts]
|
|
twitter = "twitter_cli.cli:cli"
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
python_files = ["test_*.py"]
|
|
|
|
[tool.ruff]
|
|
line-length = 100
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["twitter_cli"]
|