HackDB 0.0.2
A Python client for interacting with HackDB.
Requires Python: >=3.7

![](https://hackatime-badge.hackclub.com/U087PR1B2HX/HackDB) ![Python](https://img.shields.io/badge/Built%20with-python-3670A0?logo=python&logoColor=ffdd54) [![Hexagonical](https://img.shields.io/badge/Suite-0e9467?label=Hexagonical&labelColor=111111&logo=data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gQ3JlYXRlZCB3aXRoIElua3NjYXBlIChodHRwOi8vd3d3Lmlua3NjYXBlLm9yZy8pIC0tPgoKPHN2ZwogICB3aWR0aD0iMTkuNzQ1ODc4bW0iCiAgIGhlaWdodD0iMTguMTY0MTEybW0iCiAgIHZpZXdCb3g9IjAgMCAxOS43NDU4NzkgMTguMTY0MTEyIgogICB2ZXJzaW9uPSIxLjEiCiAgIGlkPSJzdmcxIgogICB4bWw6c3BhY2U9InByZXNlcnZlIgogICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxkZWZzCiAgICAgaWQ9ImRlZnMxIiAvPjxnCiAgICAgaWQ9ImxheWVyMSIKICAgICB0cmFuc2Zvcm09InRyYW5zbGF0ZSg2NS40MTg0MSwtMjQ5LjEwODE4KSI+PGcKICAgICAgIGlkPSJnMTYiPjxwYXRoCiAgICAgICAgIHN0eWxlPSJmaWxsOm5vbmU7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlOiMwZTk0Njc7c3Ryb2tlLXdpZHRoOjAuOTUyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtZGFzaGFycmF5Om5vbmU7c3Ryb2tlLW9wYWNpdHk6MSIKICAgICAgICAgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMjYuNjE4NDI3LC0wLjMxMzU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TEuODkyIDIwOS4wNSAxNjEuNzc2IDIyOS43MjRDMTU1Ljc5NiAyMzMuODI5IDE0Ni45OTQgMjI5Ljc4NiAxNDYuOTk0IDIyMi41MlY4LjM4OTIyWiIgZmlsbD0id2hpdGUiLz4KPC9zdmc%2BCg%3D%3D&link=https%3A%2F%2Fhackclub.com)

# HackDB
HackDB is a simple to use and easy database tool for hackclubbers and more. it bases on postgres and opens it through a webui and sdks plus a cli app

## ! Disclaimer !
AI (Artificial inteligence) has been used in this repo and its code (copilot, gemma3.1). I try to minimze its use and reduce internet slop, for more questions please reach out to me over the contact data provided in the footer :)

## How to get started
> Currently the project is only open to hackclub members </3 but that might change in the future

### WebApp
1. Head to https://hackdb.hexagonical.ch and log in using slack. 
2. Click on the database tab>new and give it a name
3. then you will be taken to a db overview page click on open in editor
4. there will be a simple table already provided for you feel free to delete it or train to get a hang of the ui

### SDKs

---
**Python**
1. Go to your dash and navigate to the tokens page
2. click on new token
3. copy it
4. install the package (if on PiPy yet?) `pip install hackdb`
5. create a simple file like so:
```python
    from python.hackdb import HackDB

    hackdb = HackDB(token="hkdb_tkn_0dff8dfe-****-****-****-3d122da57226")


    print(hackdb)
    print(hackdb.get_tables())
```
6. replace with your token
> Warning: tokens are per database so this will list all tables in that database. global tokens comming in the future <3

### CLI

1. Install using pip: `pip install hackdb-cli`
2. Login `hackdb login`
3. select login method (i recomend slack)
4. `hackdb status` get status of instance and verify if working

Availible commands:
- `hackdb status` - gets the status of the instance
- `hackdb databases` - returns a list of your databases and their ids
- `hackdb drop <database id>` - irreversibely drops a database
- `hackdb table list -d <database name>`
- `hackdb table ` 



# Contact

[jan.koch@hexagonical.ch]() - for legal/personal matters

or

[support@hexagonical.ch]() - General Support

MIT Licence - https://hexagonical.ch