Skip to content
This repository was archived by the owner on Jan 21, 2026. It is now read-only.

Bytespeicher/bit

Repository files navigation

bit

CAUTION: We have moved all of our git presence to codeberg. This repo is an archive.

If you want to maintain this code, feel free to either fork this repository or migrate it to the group on codeberg.


Bit is a simple URL shortener. It is not designed to scale very large.

Attention: This is highly alpha stuff and not yet ready for any kind of production use!

CLI

The CLI tools are only available with newer Flask versions.

Available commands are:

  • flask --app=bit initdb
    • Installs a new database
  • flask --app=bit addkey --key KEY [--limit LIMIT]
    • Adds a new API key
    • KEY must be 32 characters long
    • LIMIT is the daily limit

API

short

URL

/api/v1/short

Methods

POST

Arguments

key:  API key
      32 chars, hexadecimal

url:  URL to shorten

wish: will try to return this as link identifier, the API may return 
      another identifier than the one specified
      32 chars
      optional

Example

{
    "key": "1234567890ABCDEF",
    "url": "http://www.example.com/example",
    "wish": "MyWish"
}

long

URL

/api/v1/long

Methods

POST

Arguments

key:  API key
      32 chars, hexadecimal

id:   id of URL to expand

Example

{
    "key": "1234567890ABCDEF",
    "id":  "4af3fjnnW",
}

About

Simple URL shortener

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published