LibPttea
📖 Description
LibPttea 是一個 Python library,目的在封裝各種 PTT 功能操作,旨在輔助開發 PTTea APP 專案的 PTT 功能函式庫。
✨ Supported
- login
- logout
- get_system_info
- get_favorite_list
- get_post_list
- get_post
- 🔨 in development...
📦 Installation
LibPttea is available on PyPI:
python -m pip install libpttea
Or you can use Poetry:
poetry add libpttea
🎨 Usage
import asyncio
import libpttea
PTT_ACCOUNT = "PTT ID"
PTT_PASSWORD = "PTT 密碼"
async def main():
lib_pttea = await libpttea.login(PTT_ACCOUNT,PTT_PASSWORD)
system_info = await lib_pttea.get_system_info()
print(system_info)
# ['您現在位於 批踢踢實業坊 (140.112.172.11)',
# '系統負載: 輕輕鬆鬆',
# '線上人數: 27492/175000',
# 'ClientCode: 02000023',
# '起始時間: 10/20/2024 05:15:40',
# '編譯時間: Sun Jun 4 23:41:30 CST 2023',
# '編譯版本: https://github.com/ptt/pttbbs.git 0447b25c 8595c8b4 M']
await lib_pttea.logout()
# run the coroutine
asyncio.run(main())
🔗 Links
📜 License
Metadata
Release files for libpttea 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| libpttea-1.1.0.tar.gz | 18.9 kB | Without provenance | Details for libpttea-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| libpttea-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for libpttea-1.1.0-py3-none-any.whl |
Total release size: 41.9 kB
Release files / libpttea-1.1.0.tar.gz
| Download URL | libpttea-1.1.0.tar.gz |
|---|---|
| Size | 18.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8347f1d5f1263c1e77d0148c7c0d25b17ac840b26fe5c9e921ddd83c6055a93e
|
|
BLAKE2b-256 checksum How to use checksums |
f69c91266a714134e3d60fd8b21ad6aed7e623b1b959c700761f789c70b525f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / libpttea-1.1.0-py3-none-any.whl
| Download URL | libpttea-1.1.0-py3-none-any.whl |
|---|---|
| Size | 23.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
728070035109ed1a99edc0b35011ae82c6a5d6d798a1cc475d0b6391b3e9f710
|
|
BLAKE2b-256 checksum How to use checksums |
24fdf1bcb335aff78cdacecb6108c53be3101ac01cc12be76d78cb1610df648e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Security for libpttea 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.