gias-api2
Version, currently main branch1 version
- main branchlatestJun 23, 2022
github.com/graphia/gias-api
Quick prototype of a GIAS API
Installation
# Add this to your shard.yml
dependencies:
gias-api2:
github: graphia/gias-api
branch: mainmain is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
1.4.0- License
- MIT
- Author
- Peter Yates
- Target
gias-api2from src/gias-api.cr
Dependencies
Runtime Dependencies
README
GIAS API
This is a tiny API meant to accompany the GIAS Query Tool.
It is a proof of concept and prototype. It was intended to be built and deployed to the GOV.UK PAAS on a weekly basis for teams that need GIAS data to consume without having to handle the downloading/importing of the CSV.
The reason we're connecting via the socket is so we can keep the Docker image simple and not need to worry about PostgreSQL accounts when deploying.
Building
- ensure Crystal is installed
- install dependencies by running
shardsin the project root - build the program with
crystal build src/gias-api.cr - run it with
./gias-api
Speed
With no optimisation it's fast out of the box.
❯ time http get "localhost:3001/schools/100123"
HTTP/1.1 200 OK
Connection: keep-alive
Content-Type: application/json
Transfer-Encoding: chunked
{
"urn": 100123,
"name": "Eglinton Junior School"
}
________________________________________________________
Executed in 5.97 millis fish external
usr time 1.08 millis 0.00 micros 1.08 millis
sys time 3.83 millis 595.00 micros 3.23 millis
That's just one school, now with 49,514:
❯ time http get "localhost:3001/schools" > /tmp/all.json
________________________________________________________
Executed in 303.79 millis fish external
usr time 3.82 millis 694.00 micros 3.12 millis
sys time 15.48 millis 0.00 micros 15.48 millis
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
main- Seen
- Jun 23, 2022
- Crystal
1.4.0- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/graphia/gias-api
Metadata
- Created
- Aug 12, 2026
- Updated
- Sep 26, 2026
- Synced
- Sep 26, 2026
- Versions
- 1