# PDisk.pro API Wrapper
>A Python package to interact with the unofficial API of PDisk.pro.
## Installation
> To install the package, you can use pip:
```bash
pip install pdisk
```
## Usage
>To use the package, you must first create an instance of the Pdisk class, passing your API key as a parameter:
```python
from pdisk import Pdisk
api_key = "YOUR_API_KEY_HERE"
pdisk = Pdisk(api_key)
```
## Account
>You can retrieve your account info and stats using the following methods:
```python
account_info = await pdisk.account_info()
print(account_info.email, account_info.balance, account_info.storage_used)
account_stats = await pdisk.account_stats()
for stat in account_stats:
print(f"{stat.profit_total} : {stat.downloads} : {stat.refs}")
```
## File Upload
>You can upload files using the following methods:
```python
# Upload a file from local storage
responses = await pdisk.upload_file("/path/to/file")
for response in responses:
print(response)
# Upload a remote file
responses = await pdisk.upload_remote_file("https://example.com/file.mp4", folder_id=12345)
for response in responses:
print(response)
```
>You can check the upload status of a file using the following method:
```python
file_code = "FILE_CODE"
status = await pdisk.check_upload_status(file_code)
print(status)
```
## File Management
>You can retrieve information about a file using the following method:
```python
file_code = "FILE_CODE"
file_info = await pdisk.file_info(file_code)
for info in file_info:
print(info)
```
>You can also retrieve a list of files using the following method:
```python
files = await pdisk.get_file_list(page=1, per_page=20)
for file in files:
print(file)
```
Check Documentaion For More ... `comming soon ...`
## License
_`This project is licensed under the MIT License (c) 2023 kalanakt.`_
Raw data
{
"_id": null,
"home_page": "https://github.com/kalanakt/pdisk",
"name": "pdisk",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "python,pdisk,earn money",
"author": "kalanakt",
"author_email": "kalanakt <kalanakt@uvew.xyz>",
"download_url": "https://files.pythonhosted.org/packages/80/3d/35b5b9c114bc2ea3644b303198812aa8b19634f25aee25cf669154cad74b/pdisk-1.0.6.tar.gz",
"platform": null,
"description": "# PDisk.pro API Wrapper\r\n>A Python package to interact with the unofficial API of PDisk.pro.\r\n\r\n\r\n## Installation\r\n> To install the package, you can use pip:\r\n\r\n```bash\r\npip install pdisk\r\n```\r\n\r\n## Usage\r\n>To use the package, you must first create an instance of the Pdisk class, passing your API key as a parameter:\r\n\r\n```python\r\nfrom pdisk import Pdisk\r\n\r\napi_key = \"YOUR_API_KEY_HERE\"\r\npdisk = Pdisk(api_key)\r\n```\r\n\r\n## Account\r\n>You can retrieve your account info and stats using the following methods:\r\n\r\n```python\r\naccount_info = await pdisk.account_info()\r\nprint(account_info.email, account_info.balance, account_info.storage_used)\r\n\r\naccount_stats = await pdisk.account_stats()\r\nfor stat in account_stats:\r\n print(f\"{stat.profit_total} : {stat.downloads} : {stat.refs}\")\r\n```\r\n\r\n## File Upload\r\n>You can upload files using the following methods:\r\n\r\n```python\r\n# Upload a file from local storage\r\nresponses = await pdisk.upload_file(\"/path/to/file\")\r\nfor response in responses:\r\n print(response)\r\n\r\n# Upload a remote file\r\nresponses = await pdisk.upload_remote_file(\"https://example.com/file.mp4\", folder_id=12345)\r\nfor response in responses:\r\n print(response)\r\n```\r\n\r\n>You can check the upload status of a file using the following method:\r\n\r\n```python\r\nfile_code = \"FILE_CODE\"\r\nstatus = await pdisk.check_upload_status(file_code)\r\nprint(status)\r\n```\r\n\r\n## File Management\r\n>You can retrieve information about a file using the following method:\r\n\r\n```python\r\nfile_code = \"FILE_CODE\"\r\nfile_info = await pdisk.file_info(file_code)\r\nfor info in file_info:\r\n print(info)\r\n```\r\n\r\n>You can also retrieve a list of files using the following method:\r\n\r\n```python\r\nfiles = await pdisk.get_file_list(page=1, per_page=20)\r\nfor file in files:\r\n print(file)\r\n```\r\n\r\nCheck Documentaion For More ... `comming soon ...`\r\n\r\n## License\r\n_`This project is licensed under the MIT License (c) 2023 kalanakt.`_\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "An Unofficial Asynchronous Python version of pdisk API wrapper",
"version": "1.0.6",
"project_urls": {
"Bug Tracker": "https://github.com/kalanakt/pdisk/issues",
"Homepage": "https://github.com/kalanakt/pdisk"
},
"split_keywords": [
"python",
"pdisk",
"earn money"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8befb2afeb9026eba913c61a6fd045ea50464ed5e84d22c83c9156e0e71e5bcb",
"md5": "90ef16fd608100c3f408c033720ea07d",
"sha256": "b4e0c36a4002932ccdce21001312bb2d360b1bf53f0f10022ac67766e86868bd"
},
"downloads": -1,
"filename": "pdisk-1.0.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "90ef16fd608100c3f408c033720ea07d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 17381,
"upload_time": "2023-05-07T06:49:19",
"upload_time_iso_8601": "2023-05-07T06:49:19.639522Z",
"url": "https://files.pythonhosted.org/packages/8b/ef/b2afeb9026eba913c61a6fd045ea50464ed5e84d22c83c9156e0e71e5bcb/pdisk-1.0.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "803d35b5b9c114bc2ea3644b303198812aa8b19634f25aee25cf669154cad74b",
"md5": "77967d36ee2d50051942e787a5803201",
"sha256": "4d86d128b851b4dc5bca1d6d8071e116c3c9d2086fbf9c45765016123c359593"
},
"downloads": -1,
"filename": "pdisk-1.0.6.tar.gz",
"has_sig": false,
"md5_digest": "77967d36ee2d50051942e787a5803201",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 18210,
"upload_time": "2023-05-07T06:49:22",
"upload_time_iso_8601": "2023-05-07T06:49:22.378052Z",
"url": "https://files.pythonhosted.org/packages/80/3d/35b5b9c114bc2ea3644b303198812aa8b19634f25aee25cf669154cad74b/pdisk-1.0.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-07 06:49:22",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "kalanakt",
"github_project": "pdisk",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "pdisk"
}