{"id":13720767,"url":"https://github.com/AdaiasMagdiel/deta-clojure","last_synced_at":"2025-05-07T13:30:25.342Z","repository":{"id":227142427,"uuid":"770599106","full_name":"AdaiasMagdiel/deta-clojure","owner":"AdaiasMagdiel","description":"A Clojure library designed to simplify interactions with the Deta database. It provides a straightforward way to initialize a database connection and perform operations.","archived":false,"fork":false,"pushed_at":"2024-03-25T22:28:54.000Z","size":737,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-13T16:45:51.037Z","etag":null,"topics":["api","clojure","deta","deta-base","deta-space","web","web-development"],"latest_commit_sha":null,"homepage":"https://adaiasmagdiel.github.io/deta-clojure/","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AdaiasMagdiel.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-11T20:33:03.000Z","updated_at":"2024-04-04T19:38:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"b1878624-4262-42c2-ab24-a7015ff41533","html_url":"https://github.com/AdaiasMagdiel/deta-clojure","commit_stats":null,"previous_names":["adaiasmagdiel/deta-clojure"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdaiasMagdiel%2Fdeta-clojure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdaiasMagdiel%2Fdeta-clojure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdaiasMagdiel%2Fdeta-clojure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdaiasMagdiel%2Fdeta-clojure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AdaiasMagdiel","download_url":"https://codeload.github.com/AdaiasMagdiel/deta-clojure/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224604563,"owners_count":17339163,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","clojure","deta","deta-base","deta-space","web","web-development"],"created_at":"2024-08-03T01:01:07.857Z","updated_at":"2024-11-14T10:30:32.895Z","avatar_url":"https://github.com/AdaiasMagdiel.png","language":"Clojure","funding_links":[],"categories":["SDK's"],"sub_categories":["Clojure SDK"],"readme":"# Deta Clojure Library\n\n[![Clojars Project](https://img.shields.io/clojars/v/com.adaiasmagdiel/deta.svg)](https://clojars.org/com.adaiasmagdiel/deta)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Documentation](https://img.shields.io/badge/MKDocs-Documentation-green.svg)](https://adaiasmagdiel.github.io/deta-clojure/)\n\nDeta is a Clojure library designed to simplify interactions with the Deta Base and Deta Drive. It provides a straightforward way to initialize a service connection and perform operations. This library is ideal for developers looking to integrate Deta Space services functionality into their Clojure applications.\n\n## Table of Contents\n\n-   [Project Progress](#project-progress)\n    -   [Deta Base](#deta-base)\n    -   [Deta Drive](#deta-drive)\n-   [Features](#features)\n-   [Documentation](#documentation)\n-   [Getting Started](#getting-started)\n    -   [Prerequisites](#prerequisites)\n    -   [Installation](#installation)\n    -   [Simple Usage](#simple-usage)\n        -   [Initializing a Deta Base Connection](#initializing-a-deta-base-connection)\n        -   [Inserting Data](#inserting-data)\n        -   [Retrieving Data](#retrieving-data)\n        -   [Deleting Data](#deleting-data)\n        -   [Fetching Data](#deleting-data)\n        -   [Updating Data](#updating-data)\n-   [Testing](#testing)\n    -   [Windows](#windows)\n    -   [Linux/MacOS](#linuxmacos)\n    -   [Coverage](#coverage)\n-   [Contributing](#contributing)\n-   [License](#license)\n-   [Contact](#contact)\n\n## Project Progress\n\nThe current focus is on implementing functions for Deta Base, with Deta Drive functionalities yet to be started.\n\n### Deta Base\n\nThe Deta Base API provides a range of functionalities for data manipulation. The following functions have been implemented:\n\n-   [x] **Base Object**: Creation and configuration of the base object for API interaction.\n-   [x] **Put**: Insertion of an object into the database.\n-   [x] **Get**: Retrieval of a specific object from the database.\n-   [x] **Insert**: Insertion of a new object into the database.\n-   [x] **Fetch**: Retrieval of objects based on specific criteria.\n-   [x] **Delete**: Removal of an object from the database.\n-   [x] **Update**: Update of an existing object in the database.\n\nThe remaining functions to be implemented are:\n\n-   [ ] **Put Many**: Insertion of multiple objects into the database at once.\n\n### Deta Drive\n\nDeta Drive offers functionalities for file storage and manipulation. As of now, work on Deta Drive functionalities has not yet begun. The planned functionalities include:\n\n-   [ ] **Drive Object**: Creation and configuration of the drive object for API interaction.\n-   [ ] **Put**: Upload of a file to Deta Drive.\n-   [ ] **Get**: Download of a specific file from Deta Drive.\n-   [ ] **Delete**: Removal of a file from Deta Drive.\n-   [ ] **List**: Listing of available files in Deta Drive.\n-   [ ] **Delete Many**: Removal of multiple files from Deta Drive at once.\n\nThis project is under continuous development, with the goal of providing a robust and efficient solution for interacting with the Deta Space API in Clojure. Follow the progress and contribute with suggestions or implementations of new functionalities.\n\n## Features\n\n-   **Database Initialization**: Easily establish a connection to a Deta database with a straightforward function call.\n-   **Data Insertion**: Insert data into the Deta database, supporting various data types.\n-   **Data Update**: Update existing data in the Deta database or insert new data if the key does not exist.\n-   **Data Retrieval**: Fetch data from the Deta database by specifying a key.\n-   **Data Deletion**: Remove data from the Deta database by specifying a key.\n-   **Testing**: A comprehensive test suite is essential to ensure reliability and accuracy.\n\n## Documentation\n\nTo fully understand how to use this software, referring to the comprehensive documentation available at [https://adaiasmagdiel.github.io/deta-clojure/](https://adaiasmagdiel.github.io/deta-clojure/).\n\n## Getting Started\n\n### Prerequisites\n\n-   Clojure 1.10 or later\n-   Leiningen 2.9.1 or later\n\n### Installation\n\nThis library is now available as a dependency. You can add it to your project using Leiningen/Boot by including the following in your `project.clj` dependencies:\n\n```clojure\n[com.adaiasmagdiel/deta \"0.0.6\"]\n```\n\nFor more installation methods, such as `Clojure CLI/deps.edn`, `Gradle`, and `Maven`, please refer to the [installation](https://adaiasmagdiel.github.io/deta-clojure/#installation) section of our documentation.\n\n### Simple Usage\n\n#### Initializing a Deta Base Connection\n\n```clojure\n(def db (base/base \"your_collection_key\" \"your_basename\"))\n```\n\n#### Inserting Data\n\n```clojure\n(base/put db {:a 1 :b 2} \"item-key\")\n(base/put db {:c 3 :d 4}) ; The key is automatically generated on the server\n```\n\n```clojure\n(base/insert db {:a 1 :b 2} \"item-key\")\n(base/insert db {:c 3 :d 4}) ; The key is automatically generated on the server\n```\n\nPlease refer to the [documentation](https://adaiasmagdiel.github.io/deta-clojure/usage/#data-insertion) to understand the distinction between \"put\" and \"insert\".\n\n#### Retrieving Data\n\n```clojure\n(base/get db \"item-key\")\n```\n\n#### Deleting Data\n\n```clojure\n(base/delete db \"item-key\")\n```\n\n#### Fetching Data\n\n```clojure\n(base/fetch db) ; Fetch all records\n(base/fetch db {:name \"Jane Doe\"}) ; Fetch only records with name = \"Jane Doe\"\n(base/fetch db {:name \"Jane Doe\"} {:limit 1 :desc true}) ; Use parameters to modify fetching\n```\n\n#### Updating Data\n\n```clojure\n(base/update db \"key\" {:set {:name \"John\" :age 31 :books []}})\n(base/update db \"key\" {:increment {:age 1}})\n(base/update db \"key\" {:append {:books [\"A Book by John Doe\", \"Another Book By John Doe\"]}})\n```\n\nFor information on the update payload for the `base/update` function, please refer to the [Deta Base documentation](https://deta.space/docs/en/build/reference/http-api/base#update-item).\n\nFor more detailed usage instructions and examples, please refer to the [usage](https://adaiasmagdiel.github.io/deta-clojure/usage/#getting-started) section of our documentation.\n\n## Testing\n\nThe library includes a test suite that covers various scenarios. To run the tests, set the `DETA_KEY` environment variable with a valid Deta key beforehand.\n\n### Windows\n\n```cmd\nset DETA_KEY=your_deta_key_here\nlein test\n```\n\n### Linux/MacOS\n\n```bash\nexport DETA_KEY=your_deta_key_here\nlein test\n```\n\nReplace `your_deta_key_here` with your actual Deta key.\n\n### Coverage\n\nThis project includes a coverage tool that allows you to easily run test coverage reports. To generate coverage reports for tests, simply enter the following command:\n\n```bash\nlein cloverage\n```\n\n## Contributing\n\nContributions are always welcome! Please review the code and send suggestions or pull requests to improve the library.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Contact\n\nFor any questions or suggestions, please open an issue on GitHub.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAdaiasMagdiel%2Fdeta-clojure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAdaiasMagdiel%2Fdeta-clojure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAdaiasMagdiel%2Fdeta-clojure/lists"}