Name | termos JSON |
Version |
0.1.9
JSON |
| download |
home_page | https://github.com/yourusername/termos |
Summary | A CLI tool for executing tasks using OpenAI's assistant |
upload_time | 2024-07-20 09:11:02 |
maintainer | None |
docs_url | None |
author | Your Name |
requires_python | None |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
## Update README.md
Add information about the logout command to your `README.md`:
```markdown
## Usage
Run a task:
```bash
termos run --task "Your task description here"
```
Logout:
```bash
termos logout
```
On first use of `termos run`, you will be prompted to enter your username and password. The authentication token will be stored for future use. Use `termos logout` to remove stored credentials.
```
## 5. Testing the Logout Functionality
To test the logout functionality:
1. Ensure you're logged in by running a task:
```
termos run --task "Test task"
```
2. Now, run the logout command:
```
termos logout
```
3. You should see a message confirming that you've been logged out.
4. Try running another task. You should be prompted to log in again.
## 6. Error Handling
Consider adding error handling to the logout function. For example:
```python
import os
from pathlib import Path
TOKEN_FILE = Path.home() / '.termos_token'
def logout():
try:
if TOKEN_FILE.exists():
os.remove(TOKEN_FILE)
print("Logged out successfully. Tokens removed.")
else:
print("No active session found.")
except Exception as e:
print(f"An error occurred during logout: {e}")
```
This will catch any unexpected errors that might occur during the logout process and inform the user.
Raw data
{
"_id": null,
"home_page": "https://github.com/yourusername/termos",
"name": "termos",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "Your Name",
"author_email": "your.email@example.com",
"download_url": "https://files.pythonhosted.org/packages/5f/36/d502e473f6faca65f3df4699e8dab34af822e9812f16717df2434e8c0645/termos-0.1.9.tar.gz",
"platform": null,
"description": "## Update README.md\n\nAdd information about the logout command to your `README.md`:\n\n```markdown\n## Usage\n\nRun a task:\n```bash\ntermos run --task \"Your task description here\"\n```\n\nLogout:\n```bash\ntermos logout\n```\n\nOn first use of `termos run`, you will be prompted to enter your username and password. The authentication token will be stored for future use. Use `termos logout` to remove stored credentials.\n```\n\n## 5. Testing the Logout Functionality\n\nTo test the logout functionality:\n\n1. Ensure you're logged in by running a task:\n ```\n termos run --task \"Test task\"\n ```\n\n2. Now, run the logout command:\n ```\n termos logout\n ```\n\n3. You should see a message confirming that you've been logged out.\n\n4. Try running another task. You should be prompted to log in again.\n\n## 6. Error Handling\n\nConsider adding error handling to the logout function. For example:\n\n```python\nimport os\nfrom pathlib import Path\n\nTOKEN_FILE = Path.home() / '.termos_token'\n\ndef logout():\n try:\n if TOKEN_FILE.exists():\n os.remove(TOKEN_FILE)\n print(\"Logged out successfully. Tokens removed.\")\n else:\n print(\"No active session found.\")\n except Exception as e:\n print(f\"An error occurred during logout: {e}\")\n```\n\nThis will catch any unexpected errors that might occur during the logout process and inform the user.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A CLI tool for executing tasks using OpenAI's assistant",
"version": "0.1.9",
"project_urls": {
"Homepage": "https://github.com/yourusername/termos"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "36a5627c3b9297dafa898aacf8fae48b6ed425772ccd8986209ae037a81e2fe7",
"md5": "94ce4ddf99bf7605e99e732d356b6da3",
"sha256": "c41ed14da080252898bed917dddfa788efce1b480120879edf3dd74904faf461"
},
"downloads": -1,
"filename": "termos-0.1.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "94ce4ddf99bf7605e99e732d356b6da3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 7848,
"upload_time": "2024-07-20T09:11:00",
"upload_time_iso_8601": "2024-07-20T09:11:00.610187Z",
"url": "https://files.pythonhosted.org/packages/36/a5/627c3b9297dafa898aacf8fae48b6ed425772ccd8986209ae037a81e2fe7/termos-0.1.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5f36d502e473f6faca65f3df4699e8dab34af822e9812f16717df2434e8c0645",
"md5": "7224af523430c7ddc74ea14f58b3504f",
"sha256": "d3a527b1c9fdd3c6bf90ae4dd401e7b571280c94fb55d464368c7a04603a9ba7"
},
"downloads": -1,
"filename": "termos-0.1.9.tar.gz",
"has_sig": false,
"md5_digest": "7224af523430c7ddc74ea14f58b3504f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7158,
"upload_time": "2024-07-20T09:11:02",
"upload_time_iso_8601": "2024-07-20T09:11:02.202031Z",
"url": "https://files.pythonhosted.org/packages/5f/36/d502e473f6faca65f3df4699e8dab34af822e9812f16717df2434e8c0645/termos-0.1.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-20 09:11:02",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "yourusername",
"github_project": "termos",
"github_not_found": true,
"lcname": "termos"
}