mhs

mhs

Googly - modern, self-contained clients for any Google API

Hi all,

I want to share Googly, a code generator that turns a Google API’s Discovery document into a ready-to-use Elixir client.

It’s inspired by googleapis/elixir-google-api, now deprecated and unmaintained, which pioneered the Google Discovery-doc → structs → templates approach. Googly keeps that idea but rebuilds the output for a modern stack.

What’s different

Google’s generated clients still work, but they’re starting show their age. Googly takes a different tack:

  • Req and Jason, nothing else. Modern HTTP and JSON.
  • Self-contained clients. Each package vendors its own ~150-line runtime and depends only on :req + :jason, so every client publishes to Hex independently.
  • A flat, stateless API. No Connection struct, no nesting. It’s just Googly.CloudStorage.Objects.get(bucket, object, token: token).
  • snake_case fields, exact wire names. Fields read like Elixir (bucket.time_created) while the exact JSON key (timeCreated) is baked in per field.
  • Plain structs. Each model is a defstruct with a macro-free decode/1, plus one Jason.Encoder that drops nils so PATCH won’t clobber unset fields.

The clients we have published in Hex as of today:

  • googly_cloud_storage — read, write, and manage objects and buckets.
  • googly_cloud_vision — send an image and get back OCR text, labels, and other analysis.
  • googly_document_ai — send a document and get back parsed text, fields, and entities.

Want another API? Holler. We can generate it and publish to Hex.

Or, if you prefer to vendor privately, list it in config/apis.json and run the generator.

Cheers.

First Post!

felix-starman

felix-starman

Thank you. I was literally looking at doing something like this for waffle_gcs. google_gax has been the bane of its dependency list for years.

Any particular plans to make Jason or the http client configurable with those as default implementations?

Are you all open to that as a contribution if I added it?

Most Liked

mhs

mhs

Hey Felix! Happy to chat through what you’re thinking, if you want to toss up an issue in the repo.

Where Next?

Popular in Announcing Top

Hal9000
Here is my first stab at this. README pasted below. https://github.com/Hal9000/elixir_random Comments and critiques are welcome. Thank...
New
alisinabh
Hey everyone i’ve developed a library for Jalaali calendar for elixir which supports converting Gregorian dates to Jalaali and vice vers...
New
josevalim
Yes, yet another parser combinator library! Most of the parser combinators in the ecosystem are either compile-time, often using AST tra...
159 19951 141
New
tmbb
PhoenixWS - Websockets over Phoenix Channels Source code on Github here: GitHub - tmbb/phoenix_ws: Websockets implemented over Phoenix Ch...
New
kip
Image is an image processing library for Elixir. It is based upon the fabulous vix library that provides a libvips wrapper for Elixir. I...
622 19610 194
New
type1fool
WebAuthnLiveComponent WebAuthnComponents See this post about renaming the package. Passwordless authentication for Phoenix LiveView app...
New
zoltanszogyenyi
Hey everyone :waving_hand: Excited to join this forum - I am one of the founders and current project maintainers of a popular and open-s...
New

Other popular topics Top

rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New

We're in Beta

About us Mission Statement