{"id":15066694,"url":"https://github.com/charlesahunt/proteus","last_synced_at":"2025-04-10T13:43:21.974Z","repository":{"id":19170102,"uuid":"22402296","full_name":"CharlesAHunt/proteus","owner":"CharlesAHunt","description":"Scala Driver for ArangoDB","archived":false,"fork":false,"pushed_at":"2024-04-27T04:50:20.000Z","size":143,"stargazers_count":19,"open_issues_count":2,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T12:21:49.981Z","etag":null,"topics":["arangodb","database","scala"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"Trinea/android-open-project","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CharlesAHunt.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2014-07-30T00:52:40.000Z","updated_at":"2024-04-27T04:50:24.000Z","dependencies_parsed_at":"2024-09-25T01:10:58.251Z","dependency_job_id":"b5c92ce9-46af-4cec-84ec-862f8bd75a43","html_url":"https://github.com/CharlesAHunt/proteus","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CharlesAHunt%2Fproteus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CharlesAHunt%2Fproteus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CharlesAHunt%2Fproteus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CharlesAHunt%2Fproteus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CharlesAHunt","download_url":"https://codeload.github.com/CharlesAHunt/proteus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248226333,"owners_count":21068184,"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":["arangodb","database","scala"],"created_at":"2024-09-25T01:10:51.962Z","updated_at":"2025-04-10T13:43:21.955Z","avatar_url":"https://github.com/CharlesAHunt.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Proteus\n\n[![Latest version](https://index.scala-lang.org/charlesahunt/proteus/proteus/latest.svg)](https://index.scala-lang.org/cornfluence/proteus)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.charlesahunt/proteus_2.13/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.charlesahunt/proteus_2.13)\n[![Proteus](https://circleci.com/gh/CharlesAHunt/proteus.svg?style=svg)](https://circleci.com/gh/CharlesAHunt/proteus)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/be829fed3c134f8cbf14c60290651d63)](https://www.codacy.com/app/matthicks/proteus?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=charlesahunt/proteus\u0026amp;utm_campaign=Badge_Grade)\n[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/be829fed3c134f8cbf14c60290651d63)](https://www.codacy.com/app/matthicks/proteus?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=cornfluence/proteus\u0026utm_campaign=Badge_Coverage)\n\nArangoDB driver for Scala.\n\nThe word 'Proteus' comes the adjective protean, with the general meaning of \"versatile\", \"mutable\", \"capable of assuming many forms\". \"Protean\" has positive connotations of flexibility, versatility and adaptability. \nThe name Proteus is a nod to the versatile and many-formed nature of ArangoDB.\n\nThis driver is compatible with ArangoDB `v3.6.x`\n\n## Getting Started\n\nYou may need to add the Sonatype nexus to your resolvers:\n``` \n     resolvers ++= Seq(\"OSS\" at \"http://oss.sonatype.org/content/repositories/releases\")\n```\n\nsbt:\n```\n    libraryDependencies += \"com.cornfluence\" % \"proteus_2.13\" % \"0.7.3\"\n```\n\nmaven:\n```\n    \u003cdependency\u003e\n      \u003cgroupId\u003ecom.cornfluence\u003c/groupId\u003e\n      \u003cartifactId\u003eproteus_2.13\u003c/artifactId\u003e\n      \u003cversion\u003e0.7.3\u003c/version\u003e\n      \u003cclassifier\u003esources\u003c/classifier\u003e\n    \u003c/dependency\u003e\n```\n\nNote: Versions of Proteus greater than 0.7.0 are for ArangoDB 3.6.+ and built with Scala 2.13\n\n\n## Configuration\n\nTo configure your application's ArangoDB user, you will need to create a ProteusConfig configuration object to initialize\n  the document and graph clients.  You will most likely want to materialize the configuration case class from an application.conf\n  that looks like the following so you can materialize it to a case class using `Config.configuration` in your client:\n```\n    proteus {\n        host = \"localhost\"\n        user = \"root\"\n        password = \"openSesame\"\n        port = \"8529\",\n        tls = false\n    }\n```\n\nYou can also create the ProteusConfig manually in your source as:\n\n```\n    ProteusConfig(\n      host: String = \"localhost\",\n      user: String,\n      password: String,\n      port: String = \"8529\",\n      tls: Boolean = false\n    )\n```\n\n## Examples\n\n### Client API\n```\n    val arangoClient = ArangoClient(config = ProteusConfig(...))\n\n    val documentClient = DocumentClient(config = ProteusConfig(...), databaseName = \"testDB\")\n            \n    val graphClient = GraphClient(config = ProteusConfig(...), graphName = \"testGraph\")\n\n```\n### Database API\n\nCreate a database:\n```\n    arangoClient.createDatabase(\"dbName\", List(User(username = \"user\", password = \"pass\", active = true)))\n    \n    arangoClient.getDatabaseList\n    \n    arangoClient.getCurrentDatabase\n```           \nDelete a database:\n ```           \n    arangoClient.deleteDatabase(\"dbName\")\n            \n```            \n### Collection API\n```\n    arangoClient.createCollection(\"dbName\", testCollection)\n    \n    arangoClient.dropCollection(\"dbName\", testCollection)\n\n```            \n### Document API\n                        \nCreate a document (returning the document id as a string):\n```\n    documentClient.createDocument(\"testCollection\",\"\"\"{ \"Hello\": \"World\" }\"\"\")\n```           \nFetch all documents:\n```\n    documentClient.getAllDocuments(\"testCollection\")\n```         \nFetch a single document:\n```\n    documentClient.getDocument(\"testCollection\", \"documentID\")\n```\nUpdate/Replace a document:\n```            \n    documentClient.replaceDocument(\"testCollection\", \"documentID\",\"\"\"{ \"Hello\": \"World\" }\"\"\")\n```            \nRemove a document:\n```\n    documentClient.deleteDocument(\"testCollection\", \"documentID\")\n```            \n### Graph API\n\n (Graph API is still under some development)\n \nCreate a graph\n```\n    graphClient.createGraph(List())\n``` \nDrop a graph\n```\n    graphClient.dropGraph()\n``` \nCreate a vertex collection\n```\n    graphClient.createVertexCollection(\"vertexCollectionName\")\n```\nCreate an edge collection\n```\n    graphClient.createEdgeCollection(\"edgeCollectionName\", List(\"vertexCollectionName\"), List(\"otherVertexCollectionName\"))\n```\nCreate a vertex\n```\n    graphClient.createVertex(\"vertexCollectionName\", \"\"\"{\"free\":\"style\"}\"\"\")\n```\nCreate an edge\n```\n    graphClient.createEdge(\"edgeCollectionName\", \"typeName\", \"vertexOneID\", \"vertexTwoID\")\n```            \nDelete an edge\n```\n    graphClient.deleteEdge(\"edgeCollectionName\", \"edgeKey\")\n```\nDelete an edge collection\n```\n    graphClient.deleteEdgeCollection(\"edgeCollectionName\")\n```\nDelete a vertex\n```\n    graphClient.deleteVertex(\"vertexCollectionName\", \"vertexKey\")\n```\nDelete a vertex collection\n```\n    graphClient.deleteVertexCollection(\"vertexCollectionName\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharlesahunt%2Fproteus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcharlesahunt%2Fproteus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcharlesahunt%2Fproteus/lists"}