A collection of various helpers I use in a variety of projects
Project description
Onebag
I found myself often reusing the same helpers for a lot of my personal projects, so finally decided to gather them all together and make it easier for me to use them anywhere I wanted. The result is this Python package: Onebag
Installation & Updating
Onebag can be installed with pip.
pip install onebag
Usage
login_bot -->
Logs a user into reddit and returns a praw.reddit instance.
file_pathshould be the absolute path to alogin.txtfile.login.txtshould take the following format
<subreddit>:<user_agent>:<id>:<secret>:<refresh_token>Explanation of items:
subreddit: The subreddit you plan on targeting
user_agent: A general user_agent that Reddit will see. ex. Reddit bot by /u/username
id: At least 14 character string listed under personal user script for desired application
secret: The client secret listed adjacent to secret for the application. Should be at least 27 characters
refresh_token: A generated refresh token. See https://praw.readthedocs.io/en/stable/tutorials/refresh_token.html#refresh-token
get_timestamp --> Returns a current timestamp in the m/dd [hh:mm] format. Especially useful for logging.
Contributing
Feel free to open an issue if you encounter any bugs or have any major suggestions. Pull Requests are also welcome. Response times may vary.
License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file onebag-0.1.3.tar.gz.
File metadata
- Download URL: onebag-0.1.3.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Darwin/22.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1436806ecbc366b20dfe46f76d6851f0e9f2340ac6fe1af6610607b3ac2b222e
|
|
| MD5 |
1259236e94bf9622293b969e4bb5a729
|
|
| BLAKE2b-256 |
4c061362752ea6618863b2d0f9f59ed72d5c0a158ffadc06cd8c6007bfe1d24a
|
File details
Details for the file onebag-0.1.3-py3-none-any.whl.
File metadata
- Download URL: onebag-0.1.3-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Darwin/22.5.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4a17cbf219e2800e9bf31dbae54651c9e2a07ca1b30ff3efce78d5e9fe56a25
|
|
| MD5 |
8a9ea3647d68cc13088138caa58cf55b
|
|
| BLAKE2b-256 |
bb2e03de909a47183d72b81e7cf01af472431caaad2d6f473c91cf5db3604b91
|