randoms
Version, currently master branch1 version
- master branchlatestNov 29, 2022
github.com/chaserx/randoms
that's so random... ¯\_(ツ)_/¯
1 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
randoms:
github: chaserx/randoms
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
1.6.2- License
- MIT
- Author
- Chase Southard
- Target
randomsfrom src/randoms.cr
Dependencies
Runtime Dependencies
- kemal*github: kemalcr/kemal, branch: master
- spec-kemal*github: kemalcr/spec-kemal, branch: master
README
randoms
A small and simple web service that returns JSON formatted pseudorandom data - numbers, hexadecimal numbers, UUIDs, and base 64 strings. An excuse to try out Crystal and the companion web framework, Kemal. I had thought it might be useful to have such random data sources for Workflow workflows.
Installation
- Install Crystal
shards install
Build
crystal build --release src/randoms.cr
Usage
./randoms- visit localhost:3000
Endpoints
/hexreturns JSON with data: {random: "b48ed003fbe56939b9b1715542146084"}/hex?length=3returns JSON with data: {random: "b48ed0"}/numberreturns JSON with data: {random: "88"}/number?length=10returns JSON with data: {random: "8"}/uuidreturns JSON with data: {random: "fc07646c-c24b-4744-a31a-87c979a80e26"}/base64returns JSON with data: {random: "KCbA8xgLGyddXMf6X3dzFg=="}
{
"method": "hex",
"data": {
"random": "f87b10c557f16361c9de82afbcfdd257"
},
"responded_at": "2016-12-27T21:20:57+0000"
}
Testing
KEMAL_ENV=test crystal spec
Contributing
- Fork it ( https://github.com/chaserx/randoms/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- chaserx Chase Southard
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Nov 29, 2022
- Crystal
1.6.2- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/chaserx/randoms
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 14, 2026
- Synced
- Aug 14, 2026
- Versions
- 1