graflo 1.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of graflo might be problematic. Click here for more details.

Files changed (45) hide show
  1. graflo/README.md +18 -0
  2. graflo/__init__.py +39 -0
  3. graflo/architecture/__init__.py +37 -0
  4. graflo/architecture/actor.py +974 -0
  5. graflo/architecture/actor_util.py +425 -0
  6. graflo/architecture/edge.py +295 -0
  7. graflo/architecture/onto.py +374 -0
  8. graflo/architecture/resource.py +161 -0
  9. graflo/architecture/schema.py +136 -0
  10. graflo/architecture/transform.py +292 -0
  11. graflo/architecture/util.py +93 -0
  12. graflo/architecture/vertex.py +277 -0
  13. graflo/caster.py +409 -0
  14. graflo/cli/__init__.py +14 -0
  15. graflo/cli/ingest.py +144 -0
  16. graflo/cli/manage_dbs.py +193 -0
  17. graflo/cli/plot_schema.py +132 -0
  18. graflo/cli/xml2json.py +93 -0
  19. graflo/db/__init__.py +32 -0
  20. graflo/db/arango/__init__.py +16 -0
  21. graflo/db/arango/conn.py +734 -0
  22. graflo/db/arango/query.py +180 -0
  23. graflo/db/arango/util.py +88 -0
  24. graflo/db/connection.py +304 -0
  25. graflo/db/manager.py +104 -0
  26. graflo/db/neo4j/__init__.py +16 -0
  27. graflo/db/neo4j/conn.py +432 -0
  28. graflo/db/util.py +49 -0
  29. graflo/filter/__init__.py +21 -0
  30. graflo/filter/onto.py +400 -0
  31. graflo/logging.conf +22 -0
  32. graflo/onto.py +186 -0
  33. graflo/plot/__init__.py +17 -0
  34. graflo/plot/plotter.py +556 -0
  35. graflo/util/__init__.py +23 -0
  36. graflo/util/chunker.py +739 -0
  37. graflo/util/merge.py +148 -0
  38. graflo/util/misc.py +37 -0
  39. graflo/util/onto.py +63 -0
  40. graflo/util/transform.py +406 -0
  41. graflo-1.1.0.dist-info/METADATA +157 -0
  42. graflo-1.1.0.dist-info/RECORD +45 -0
  43. graflo-1.1.0.dist-info/WHEEL +4 -0
  44. graflo-1.1.0.dist-info/entry_points.txt +5 -0
  45. graflo-1.1.0.dist-info/licenses/LICENSE +126 -0
graflo/README.md ADDED
@@ -0,0 +1,18 @@
1
+ ### Table Config
2
+
3
+ Table part of the config specifies how input sources will be transformed and mapped to vertex collections.
4
+
5
+ ```yaml
6
+ table:
7
+ - tabletype: ibes
8
+ encoding: ISO-8859-1
9
+ transforms:
10
+ - foo: parse_date_ibes
11
+ module: graflo.util.transform
12
+ input:
13
+ - ANNDATS
14
+ - ANNTIMS
15
+ output:
16
+ - datetime_announce
17
+ ```
18
+
graflo/__init__.py ADDED
@@ -0,0 +1,39 @@
1
+ """graflo: A flexible graph database abstraction layer.
2
+
3
+ graflo provides a unified interface for working with different graph databases
4
+ (ArangoDB, Neo4j) through a common API. It handles graph operations, data
5
+ transformations, and query generation while abstracting away database-specific
6
+ details.
7
+
8
+ Key Features:
9
+ - Database-agnostic graph operations
10
+ - Flexible schema management
11
+ - Query generation and execution
12
+ - Data transformation utilities
13
+ - Filter expression system
14
+
15
+ Example:
16
+ >>> from graflo.db.manager import ConnectionManager
17
+ >>> with ConnectionManager(config) as conn:
18
+ ... conn.init_db(schema, clean_start=True)
19
+ ... conn.upsert_docs_batch(docs, "users")
20
+ """
21
+
22
+ from .architecture import Index, Schema
23
+ from .caster import Caster
24
+ from .db import ConnectionManager, ConnectionType
25
+ from .filter.onto import ComparisonOperator, LogicalOperator
26
+ from .onto import AggregationType
27
+ from .util.onto import Patterns
28
+
29
+ __all__ = [
30
+ "Caster",
31
+ "ConnectionManager",
32
+ "ConnectionType",
33
+ "ComparisonOperator",
34
+ "LogicalOperator",
35
+ "Index",
36
+ "Schema",
37
+ "Patterns",
38
+ "AggregationType",
39
+ ]
@@ -0,0 +1,37 @@
1
+ """Graph database architecture components.
2
+
3
+ This package defines the core architecture components for graph database operations,
4
+ including schema management, resource handling, and data transformations.
5
+
6
+ Key Components:
7
+ - Schema: Graph database schema definition and management
8
+ - Resource: Data resource management and processing
9
+ - Transform: Data transformation and standardization
10
+ - Vertex: Vertex collection configuration
11
+ - Edge: Edge collection configuration
12
+
13
+ Example:
14
+ >>> from graflo.architecture import Schema, Resource
15
+ >>> schema = Schema(
16
+ ... general={"name": "my_graph", "version": "1.0"},
17
+ ... vertex_config=vertex_config,
18
+ ... edge_config=edge_config
19
+ ... )
20
+ >>> resource = Resource(name="users", data=user_data)
21
+ """
22
+
23
+ from .edge import Edge, EdgeConfig
24
+ from .onto import Index
25
+ from .resource import Resource
26
+ from .schema import Schema
27
+ from .vertex import Vertex, VertexConfig
28
+
29
+ __all__ = [
30
+ "Edge",
31
+ "EdgeConfig",
32
+ "Index",
33
+ "Resource",
34
+ "Schema",
35
+ "Vertex",
36
+ "VertexConfig",
37
+ ]