npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

sapapa

v0.0.0

Published

A soothing CouchDB client for Reason/OCaml

Downloads

4

Readme

Sapapa 😌

Build Status

A soothing CouchDB client for native Reason and OCaml. Just Relax. 😌

Under the hood, it calmly leverages Yojson for JSON parsing and Lwt for non-blocking I/O. Every API call returns a result type which has a strongly-typed error in return, so you know exactly what failed, in order to build safer apps.

In the future, we may want to support different JSON engines and async libraries (like Jane Street's Async), but for now, this gives a fast and safe environment.

The state of mind behind this library is that you can get Client can give you a reference to a Database, whether it exists or not, and a Database can give you a reference to a Document, whether it exists or not:

let client =
  Sapapa.Client.make(~baseUrl="http://couchdb-instance.example.com:5984");

let db =
  Sapapa.Client.db(~name=Sapapa.UrlComponent.make("my_first_database")); // <- doesn't create a db, just a nice reference

Sapapa.Database.create(db) // <- this creates the db!
|> Lwt.map(res =>
     switch (res) {
     | Ok(db) => print_endline("Database created!")
     | Error(error) =>
       print_endline(
         "Database creation failed: "
         ++ Sapapa.Database.show_create_error(error),
       )
     }
   );

Installation:

esy add sapapa

Annotated file tree:

sapapa
├─test/      <- these are the tests
└─library/   <- this is the source code

Contribution:

npm install -g esy
git clone [email protected]:Schniz/sapapa.git
esy install

Running Tests:

docker-compose up -d
esy test --watch