<commit_before>kapsule
=======

A fast, easy way to store and retrieve data on the Android Platform.
<commit_msg>Got started on the readme<commit_after>kapsule
====================
kapsule is a simple android storage utility that makes unsophisticated local datastore use a breeze. It brings the feel of a map to database interaction on Android that seems more intuitive to beginners. Its pretty darned simple.

Say you have a session object for your Android app that stores some basic information:

  ```java
  public class MySesh {
      private String userName;
      private long sessionId;
      
      public MySesh() {}
      public MySesh(String userName, long sessionId) {
          this.sessionId = sessionId;
          this.userName = userName;
      }
      
      // Some getters...
      // Some setters...
  }
  ```
    
Storing a session object in a kapsule is as easy as:

  ```java
  Kapsule.put("da session", new MySesh("jdoe", 1337)).then(new Put.Callback() {
      @Override
      public void success() {
          Log.d("test", "car1 put() successfully");
      }
  });
  ```
    
or if you want to do it synchronously:

  ```java
  Kapsule.put("da session", new MySesh("jdoe", 1337)).synchronously();
  ```
    
As you can tell, the inline simplicity of the query makes database interaction trivial. You can even have different kapsules for different groups of information. For instance, instead of having a session class, I could have a kapsule called "session" and put the same fields into it - observe:

  ```java
  Kapsule.put("userName", "jdoe").into("session").synchronously();
  Kapsule.put("sessionId", 1337).into("session").synchronously();
  ```
    
Getting your data back is equally trivial:

  ```java
  String userName = Kapsule.get("userName", String.class).from("session").synchronously();
  // Lets do it asynchronously this time
  Kapsule.get("sessionId", Long.class).from("session").then(new Get.Callback<Long>() {
      @Override
      public void success(Long sessionId) {
          // I got the sessionId back!
      }
  
      @Override
      public void failure(Throwable e) {
          // In the unlikely case that there was a problem, it goes here
          e.printStackTrace();
      }
  });
  // Same goes for our custom MySesh session
  MySesh sesh = Kapsule.get("da session", MySesh.class).synchronously();
  ```
    


{'fraction_non_alphanumeric': 0.11340640809443507, 'fraction_numerical': 0.0054806070826306915, 'mean_word_length': 3.0357142857142856, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1235043', 'n_tokens_mistral': 690, 'n_tokens_neox': 667, 'n_words': 250}