# <img src="https://raw.githubusercontent.com/lszeremeta/knows/main/logo/knows-logo.png" alt="Knows logo" width="300">
[![PyPI](https://img.shields.io/pypi/v/knows)](https://pypi.org/project/knows/) [![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/lszeremeta/knows?label=Docker%20image%20size)](https://hub.docker.com/r/lszeremeta/knows)
Knows is a user-friendly tool for benchmarking property graphs. These graphs are crucial in many fields. Knows supports
multiple output formats and visualization capabilities, making it a go-to tool for educators, researchers, and data
enthusiasts.
## Key Features 🚀
- **Customizable Graph Generation**: Tailor your graphs by specifying the number of nodes and edges.
- **Diverse Output Formats**: Export graphs in formats like GraphML, YARS-PG, GEXF, GML, SVG, JSON, and others.
- **Integrated Graph Visualization**: Conveniently visualize your graphs in SVG format.
- **Intuitive Command-Line Interface (CLI)**: A user-friendly CLI for streamlined graph generation and visualization.
- **Docker Compatibility**: Deploy Knows in Docker containers for a consistent and isolated runtime environment.
## Graph Structure
- Generates graphs with specified or random nodes and edges.
- Creates directed graphs.
- Nodes are labeled `Person` with unique IDs (`N1, N2, N3, ..., Nn`).
- Nodes feature `firstName` and `lastName` properties with randomly assigned names.
- Edges are labeled `knows` and include a `createDate` property with a random date.
- Edges have random nodes, avoiding cycles.
## Installation 🛠️
You can install knows via PyPI Docker or run it from the source code.
### Install via PyPI
1. **Installation**:
```shell
pip install knows[draw]
```
The `draw` installs a `matplotlib` library for graph visualization. You can omit the `[draw]` if you don't need visualization and `svg` output generation.
2. **Running Knows**:
```shell
knows [nodes] [edges] [options]
```
### Docker Deployment 🐳
#### From Docker Hub
1. **Pull Image**:
```shell
docker pull lszeremeta/knows
```
2. **Run Container**:
```shell
docker run --rm lszeremeta/knows [nodes] [edges] [options]
```
#### Building from Source
1. **Build Image**:
```shell
docker build -t knows .
```
2. **Run Container**:
```shell
docker run --rm knows [nodes] [edges] [options]
```
### Python from Source
1. **Clone Repository**:
```shell
git clone git@github.com:lszeremeta/knows.git
cd knows
```
2. **Install Requirements**:
```shell
pip install -r requirements.txt
```
3. **Execute Knows**:
```shell
python -m knows [nodes] [edges] [options]
```
## Usage 💡
### Basic Usage
```shell
knows [nodes] [edges] [options]
```
To view all available options, use:
```shell
knows -h
```
### Positional Arguments
1. `nodes`: Specify the number of nodes in the graph. Selected randomly if not specified.
2. `edges`: Specify the number of edges in the graph. Selected randomly if not specified.
### Options
- `-h`, `--help`: Display the help message and exit the program.
- `-f {graphml,yarspg,gexf,gml,svg,adjacency_list,multiline_adjacency_list,edge_list,json}`, `--format {graphml,yarspg,gexf,gml,svg,adjacency_list,multiline_adjacency_list,edge_list,json}`:
Choose the format to output the graph. Default: `graphml`.
- `-d`, `--draw`: Generate an image of the graph (default is no image). This option may not work in the Docker.
### Practical Examples 🌟
1. Create a random graph in GraphML format:
```shell
knows
```
2. Create a 100-node, 70-edge graph in [YARS-PG format](https://github.com/lszeremeta/yarspg):
```shell
knows 100 70 -f yarspg > graph.yarspg
```
3. Create a 100-node, 50-edge graph in GraphML format:
```shell
knows 100 50 > graph.graphml
```
4. Create, save, and visualize a 100-node, 50-edge graph in SVG:
```shell
knows 100 50 -f svg -d > graph.svg
```
5. Create, save a 100-node, 50-edge graph in SVG with a custom filename:
```shell
knows 100 50 -f svg > graph.svg
```
6. Create a graph in JSON format:
```shell
knows -f json > graph.json
```
## Contribute to Knows 👥
Your ideas and contributions can make Knows even better! If you're new to open source,
read [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
and [CONTRIBUTING.md](https://github.com/lszeremeta/knows/blob/main/CONTRIBUTING.md).
## License 📜
Knows is licensed under the [MIT License](https://github.com/lszeremeta/knows/blob/main/LICENSE).
Raw data
{
"_id": null,
"home_page": "https://github.com/lszeremeta/knows",
"name": "knows",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "knows,benchmark,yarspg,graphs,mathematics,CLI,GraphML,YARS-PG,property graph,graph,graph database,graph data,Neo4j,NetworkX,Faker,graph analysis,benchmarking,graph visualization,data science,graph algorithms,network analysis,graph tool,data analytics,educational tool,research tool,graph generation,python graph,docker graph tool,command line interface,CLI tool,json,svg,data visualization",
"author": "\u0141ukasz Szeremeta",
"author_email": "l.szeremeta.dev+knows@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/a0/b3/ba2fc2b82f29329ac1e530c4e15840a95bf5cec5ff46be112fd84d453917/knows-1.0.0.tar.gz",
"platform": null,
"description": "# <img src=\"https://raw.githubusercontent.com/lszeremeta/knows/main/logo/knows-logo.png\" alt=\"Knows logo\" width=\"300\">\n\n[![PyPI](https://img.shields.io/pypi/v/knows)](https://pypi.org/project/knows/) [![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/lszeremeta/knows?label=Docker%20image%20size)](https://hub.docker.com/r/lszeremeta/knows)\n\nKnows is a user-friendly tool for benchmarking property graphs. These graphs are crucial in many fields. Knows supports\nmultiple output formats and visualization capabilities, making it a go-to tool for educators, researchers, and data\nenthusiasts.\n\n## Key Features \ud83d\ude80\n\n- **Customizable Graph Generation**: Tailor your graphs by specifying the number of nodes and edges.\n- **Diverse Output Formats**: Export graphs in formats like GraphML, YARS-PG, GEXF, GML, SVG, JSON, and others.\n- **Integrated Graph Visualization**: Conveniently visualize your graphs in SVG format.\n- **Intuitive Command-Line Interface (CLI)**: A user-friendly CLI for streamlined graph generation and visualization.\n- **Docker Compatibility**: Deploy Knows in Docker containers for a consistent and isolated runtime environment.\n\n## Graph Structure\n\n- Generates graphs with specified or random nodes and edges.\n- Creates directed graphs.\n- Nodes are labeled `Person` with unique IDs (`N1, N2, N3, ..., Nn`).\n- Nodes feature `firstName` and `lastName` properties with randomly assigned names.\n- Edges are labeled `knows` and include a `createDate` property with a random date.\n- Edges have random nodes, avoiding cycles.\n\n## Installation \ud83d\udee0\ufe0f\n\nYou can install knows via PyPI Docker or run it from the source code.\n\n### Install via PyPI\n\n1. **Installation**:\n ```shell\n pip install knows[draw]\n ```\n The `draw` installs a `matplotlib` library for graph visualization. You can omit the `[draw]` if you don't need visualization and `svg` output generation.\n\n2. **Running Knows**:\n ```shell\n knows [nodes] [edges] [options]\n ```\n\n### Docker Deployment \ud83d\udc33\n\n#### From Docker Hub\n\n1. **Pull Image**:\n ```shell\n docker pull lszeremeta/knows\n ```\n\n2. **Run Container**:\n ```shell\n docker run --rm lszeremeta/knows [nodes] [edges] [options]\n ```\n\n#### Building from Source\n\n1. **Build Image**:\n ```shell\n docker build -t knows .\n ```\n\n2. **Run Container**:\n ```shell\n docker run --rm knows [nodes] [edges] [options]\n ```\n\n### Python from Source\n\n1. **Clone Repository**:\n ```shell\n git clone git@github.com:lszeremeta/knows.git\n cd knows\n ```\n\n2. **Install Requirements**:\n ```shell\n pip install -r requirements.txt\n ```\n\n3. **Execute Knows**:\n ```shell\n python -m knows [nodes] [edges] [options]\n ```\n\n## Usage \ud83d\udca1\n\n### Basic Usage\n\n```shell\nknows [nodes] [edges] [options]\n```\n\nTo view all available options, use:\n\n```shell\nknows -h\n```\n\n### Positional Arguments\n\n1. `nodes`: Specify the number of nodes in the graph. Selected randomly if not specified.\n2. `edges`: Specify the number of edges in the graph. Selected randomly if not specified.\n\n### Options\n\n- `-h`, `--help`: Display the help message and exit the program.\n- `-f {graphml,yarspg,gexf,gml,svg,adjacency_list,multiline_adjacency_list,edge_list,json}`, `--format {graphml,yarspg,gexf,gml,svg,adjacency_list,multiline_adjacency_list,edge_list,json}`:\n Choose the format to output the graph. Default: `graphml`.\n- `-d`, `--draw`: Generate an image of the graph (default is no image). This option may not work in the Docker.\n\n### Practical Examples \ud83c\udf1f\n\n1. Create a random graph in GraphML format:\n ```shell\n knows\n ```\n2. Create a 100-node, 70-edge graph in [YARS-PG format](https://github.com/lszeremeta/yarspg):\n ```shell\n knows 100 70 -f yarspg > graph.yarspg\n ```\n3. Create a 100-node, 50-edge graph in GraphML format:\n ```shell\n knows 100 50 > graph.graphml\n ```\n4. Create, save, and visualize a 100-node, 50-edge graph in SVG:\n ```shell\n knows 100 50 -f svg -d > graph.svg\n ```\n5. Create, save a 100-node, 50-edge graph in SVG with a custom filename:\n ```shell\n knows 100 50 -f svg > graph.svg\n ```\n6. Create a graph in JSON format:\n ```shell\n knows -f json > graph.json\n ```\n\n## Contribute to Knows \ud83d\udc65\n\nYour ideas and contributions can make Knows even better! If you're new to open source,\nread [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)\nand [CONTRIBUTING.md](https://github.com/lszeremeta/knows/blob/main/CONTRIBUTING.md).\n\n## License \ud83d\udcdc\n\nKnows is licensed under the [MIT License](https://github.com/lszeremeta/knows/blob/main/LICENSE).\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "Property graph benchmark that creates graphs with specified node and edge numbers, supporting multiple output formats and visualization",
"version": "1.0.0",
"project_urls": {
"Bug Tracker": "https://github.com/lszeremeta/knows/issues",
"Homepage": "https://github.com/lszeremeta/knows",
"Source Code": "https://github.com/lszeremeta/knows"
},
"split_keywords": [
"knows",
"benchmark",
"yarspg",
"graphs",
"mathematics",
"cli",
"graphml",
"yars-pg",
"property graph",
"graph",
"graph database",
"graph data",
"neo4j",
"networkx",
"faker",
"graph analysis",
"benchmarking",
"graph visualization",
"data science",
"graph algorithms",
"network analysis",
"graph tool",
"data analytics",
"educational tool",
"research tool",
"graph generation",
"python graph",
"docker graph tool",
"command line interface",
"cli tool",
"json",
"svg",
"data visualization"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2fcc58ad0407658a49cc3aed78c35eea32505c6cb341666646f549445d3eef9c",
"md5": "5450ba0012039a4225a633405c9883a9",
"sha256": "c87e4ab9a1a5daa5acdaa9a7625213694eebc0bb6e7560df0df1535d4bfc2aca"
},
"downloads": -1,
"filename": "knows-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5450ba0012039a4225a633405c9883a9",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 12322,
"upload_time": "2024-01-28T22:22:40",
"upload_time_iso_8601": "2024-01-28T22:22:40.518729Z",
"url": "https://files.pythonhosted.org/packages/2f/cc/58ad0407658a49cc3aed78c35eea32505c6cb341666646f549445d3eef9c/knows-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a0b3ba2fc2b82f29329ac1e530c4e15840a95bf5cec5ff46be112fd84d453917",
"md5": "0639cddf7f9128ba76978068a832c593",
"sha256": "72888a1b9b06db60346e318587ffee3b935687acdb00726e1adc777020f54f6f"
},
"downloads": -1,
"filename": "knows-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "0639cddf7f9128ba76978068a832c593",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 12098,
"upload_time": "2024-01-28T22:22:41",
"upload_time_iso_8601": "2024-01-28T22:22:41.509848Z",
"url": "https://files.pythonhosted.org/packages/a0/b3/ba2fc2b82f29329ac1e530c4e15840a95bf5cec5ff46be112fd84d453917/knows-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-28 22:22:41",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "lszeremeta",
"github_project": "knows",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "knows"
}