slacktokengetter
Gets Slack tokens — wrapper around slacktokens providing a CLI entrypoint.
Usage
uvx --python=3.11 slacktokengetter
Prints Slack tokens and cookies as JSON on stdout. Example output (obviously the below token and cookie are not real):
{"tokens": {"https://WORKSPACE.slack.com/": {"token": "xoxc-1234567890123-4567890123456-78901234567890-0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef", "name": "My Workspace"}}, "cookie": {"name": "d", "value": "xoxd-nID%2Ba1BC%2Babc1d2eFGhiJKl34MN5opQRsTU6VWxyZ7abcD8E9F0gH1ijk2LM3nOpqrs4t5UVWxyzab6cdE7FGh8ijKLm9OpqR%2BabCD123Efg45Hijk%2Bl6MNOpq7Rs89tUvWx0YZaBcd1EF%2BghI2J3KL6mNOpqRstuvw78XYZa9BCD0ef1GhIjk2lmN3OPq34r%2FsTuVWxyzABCd5efGhI6j7klmN8op%3D%3D"}}
If it fails, it will print JSON with error and traceback fields instead.
Acknowledgements
This project vendors pycookiecheat (commit fe0d6896) by Nathan Henrie, licensed under the MIT License. A copy of that license is included in this repository as vendor/pycookiecheat-LICENSE and in the distributed packages as pycookiecheat-LICENSE.
This project vendors slacktokens (commit 69d8760b) by Heath Raftery, licensed under the GNU General Public License v3 (GPLv3). A copy of that license is included in this repository as vendor/slacktokens-LICENSE and in the distributed packages as slacktokens-LICENSE.
Why the vendoring?
pycookiecheat is vendored because the latest released version (0.8.0) has broken support for the Slack app on macOS if you use the non-Mac App Store distribution of Slack; the maintainer has merged a PR to fix this issue, but hasn't yet made a new release incorporating that fix. While one could address this by using a git+ssh:// dependency, PyPI does not allow packages containing such dependencies to be uploaded. So to distribute this via PyPI, we have to vendor pycookiecheat. And that in turn forces us to vendor slacktokens, since it has the dependency on pycookiecheat.
We don't namespace/"shadow"/relocate the dependencies we vendor; as a result, you can't install this into the same environment as the unvendored slacktokens and pycookiecheat packages. However, that is not a problem, since this package is essentially an application distributed via PyPI, it is not intended to be used as a library.
Why only Python 3.11?
slacktokens uses leveldb which has not been updated since 2019, and which is broken on Python 3.12 and newer. There is a fork leveldb-312 which supports Python 3.12, and also an alternative package (plyvel) which does. However, given this is intended to be invoked using uvx, for now I decided to just make everyone use Python 3.11. If another Python app is calling this as a subprocess, it can use whichever Python version you wish. It would work with Python 3.10 too, but I decided it would be simpler to only support the latest working version.
Metadata
Release files for slacktokengetter 0.1.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| slacktokengetter-0.1.12.tar.gz | 29.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| slacktokengetter-0.1.12-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 59.6 kB
Release files / slacktokengetter-0.1.12.tar.gz
| Download URL | slacktokengetter-0.1.12.tar.gz |
|---|---|
| Size | 29.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f021f0632e614b09710d255dbc24c020c8ec5db3e0cc1e451f00e3d790419a6d
|
|
BLAKE2b-256 checksum How to use checksums |
e9786f565b9525c55595ca1328b4c7a5898e4d7fc65ca5a15b0aec136a02d1e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / slacktokengetter-0.1.12-py3-none-any.whl
| Download URL | slacktokengetter-0.1.12-py3-none-any.whl |
|---|---|
| Size | 30.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
651c27b32bc4fe301eb557225351117bf18733afce6ba90fc60cc95379ada2b9
|
|
BLAKE2b-256 checksum How to use checksums |
8ab54678b864fada632631908ed1c57941cd87a50382f76271ebf63724b4561a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|