Skip to content

A Short-Lived Disposable Settings API

Sometimes we just need a quick way to persist some data without getting into creating a dedicated data store. Or maybe we just don't want to pollute an existing storage with temporary data that is ephermal in nature and we only need for a short little while. Demo apps, mock ups, proofs of concept... are all use cases for this service.

Well, say hello to prefs.us!

  • No accounts. No logins.
  • No databases to create and manage.
  • Custom deep links for key/vaue pairs or config files
  • Inactive data purged automatically.
  • Set your own TTL on any piece of data.
  • Organize your data by projects, domains, lists.
  • All data stored encrypted.


<!-- write endpoint -->
> curl https://prefs.us/read?key=[api_key]&mydata=value

<!-- read endpoint -->
> curl https://prefs.us/write?key=[api_key]
<script src="https://prefs.us/prefs.us.js"></script>

// use API key
prefs_us.using("[api_key]");

// write data
prefs_us.write("email=john.doe@email.com");

// read data
prefs_us.read( (data) => {
    if (data.status == 'success') {
        let mydata = data.values;
    }
});
<script src="https://prefs.us/prefs.us.js"></script>

// use API key
prefs_us.using("[api_key]");

// write data
prefs_us.write("email=john.doe@email.com");

// read data
prefs_us.read()
    .then( (response) => response.json())
    .then((data) => {
        console.log(data.values);
    })
    .catch( (error) => {
        console.log(error);
    });
import com.gorny.prefsus;

// use API key
PrefsUs prefs = PrefsUs.using("apikey...");

// write data
prefs.write("email=john.doe@email.com");

// read data
prefs.read((data) -> {
    System.out.println("Received data: " + data);
});
import prefsus

prefs = prefsus.using("api_key");

# read
prefs.write("email=john.doe@email.com")

# write
mydata = prefsus.read()
print(mydata)