Skip to content

Commit 114b45f

Browse files
authored
Foxx API (#65)
* Adding foxx API * Finishing foxx API * Foxx documentation
1 parent 7586d09 commit 114b45f

File tree

11 files changed

+1332
-6
lines changed

11 files changed

+1332
-6
lines changed

arangoasync/database.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
DefaultApiExecutor,
7575
TransactionApiExecutor,
7676
)
77+
from arangoasync.foxx import Foxx
7778
from arangoasync.graph import Graph
7879
from arangoasync.request import Method, Request
7980
from arangoasync.response import Response
@@ -199,6 +200,15 @@ def cluster(self) -> Cluster:
199200
"""
200201
return Cluster(self._executor)
201202

203+
@property
204+
def foxx(self) -> Foxx:
205+
"""Return Foxx API wrapper.
206+
207+
Returns:
208+
arangoasync.foxx.Foxx: Foxx API wrapper.
209+
"""
210+
return Foxx(self._executor)
211+
202212
async def properties(self) -> Result[DatabaseProperties]:
203213
"""Return database properties.
204214

arangoasync/exceptions.py

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,90 @@ class EdgeListError(ArangoServerError):
395395
"""Failed to retrieve edges coming in and out of a vertex."""
396396

397397

398+
class FoxxConfigGetError(ArangoServerError):
399+
"""Failed to retrieve Foxx service configuration."""
400+
401+
402+
class FoxxConfigReplaceError(ArangoServerError):
403+
"""Failed to replace Foxx service configuration."""
404+
405+
406+
class FoxxConfigUpdateError(ArangoServerError):
407+
"""Failed to update Foxx service configuration."""
408+
409+
410+
class FoxxCommitError(ArangoServerError):
411+
"""Failed to commit local Foxx service state."""
412+
413+
414+
class FoxxDependencyGetError(ArangoServerError):
415+
"""Failed to retrieve Foxx service dependencies."""
416+
417+
418+
class FoxxDependencyReplaceError(ArangoServerError):
419+
"""Failed to replace Foxx service dependencies."""
420+
421+
422+
class FoxxDependencyUpdateError(ArangoServerError):
423+
"""Failed to update Foxx service dependencies."""
424+
425+
426+
class FoxxScriptListError(ArangoServerError):
427+
"""Failed to retrieve Foxx service scripts."""
428+
429+
430+
class FoxxDevModeEnableError(ArangoServerError):
431+
"""Failed to enable development mode for Foxx service."""
432+
433+
434+
class FoxxDevModeDisableError(ArangoServerError):
435+
"""Failed to disable development mode for Foxx service."""
436+
437+
438+
class FoxxDownloadError(ArangoServerError):
439+
"""Failed to download Foxx service bundle."""
440+
441+
442+
class FoxxReadmeGetError(ArangoServerError):
443+
"""Failed to retrieve Foxx service readme."""
444+
445+
446+
class FoxxScriptRunError(ArangoServerError):
447+
"""Failed to run Foxx service script."""
448+
449+
450+
class FoxxServiceCreateError(ArangoServerError):
451+
"""Failed to create Foxx service."""
452+
453+
454+
class FoxxServiceDeleteError(ArangoServerError):
455+
"""Failed to delete Foxx services."""
456+
457+
458+
class FoxxServiceGetError(ArangoServerError):
459+
"""Failed to retrieve Foxx service metadata."""
460+
461+
462+
class FoxxServiceListError(ArangoServerError):
463+
"""Failed to retrieve Foxx services."""
464+
465+
466+
class FoxxServiceReplaceError(ArangoServerError):
467+
"""Failed to replace Foxx service."""
468+
469+
470+
class FoxxServiceUpdateError(ArangoServerError):
471+
"""Failed to update Foxx service."""
472+
473+
474+
class FoxxSwaggerGetError(ArangoServerError):
475+
"""Failed to retrieve Foxx service swagger."""
476+
477+
478+
class FoxxTestRunError(ArangoServerError):
479+
"""Failed to run Foxx service tests."""
480+
481+
398482
class GraphCreateError(ArangoServerError):
399483
"""Failed to create the graph."""
400484

0 commit comments

Comments
 (0)