Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/natir/ggraph
Simply add graph, with just one url
https://github.com/natir/ggraph
Last synced: about 1 month ago
JSON representation
Simply add graph, with just one url
- Host: GitHub
- URL: https://github.com/natir/ggraph
- Owner: natir
- Created: 2016-01-29T18:53:06.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-02T14:33:30.000Z (almost 9 years ago)
- Last Synced: 2024-10-14T03:07:34.917Z (2 months ago)
- Language: Python
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# GGraph
web service for generate image with graphviz dot language
## Requirement
* python >= 3.4
* graphviz## Instalation
git clone https://github.com/natir/ggraph.git
pip install -r requirements.txt
For test instalation you can run :
make run PORT=[port number default 8080]
## Usage
Service is provide at this adresse : [http://ggraph.pierre.marijon.fr/](http://ggraph.pierre.marijon.fr/)
You can try some exemple url :
* [node a to b](http://ggraph.pierre.marijon.fr/dot/svg/digraph{a->b;})
* [node a to b png version](http://ggraph.pierre.marijon.fr/dot/png/digraph{a->b;})
* [complex graph](http://ggraph.pierre.marijon.fr/dot/svg/digraph{
fontname = "Bitstream Vera Sans";
fontsize = 8;
node [fontname = "Bitstream Vera Sans";fontsize = 8;shape = "record";];
edge [fontname = "Bitstream Vera Sans";fontsize = 8;];
Sequence [label = "{Sequence | +data : string \\l +comment : string \\l| + gc\(\) : float}"];
Genome [label = "{Genome | +seqs : Sequence[] \\l +annotation : Annotation \\l}"];
Sequence -> Genome;
})In markdown you need escape \, ( and ) charactere with \, exemple :
[complex graph](http://ggraph.pierre.marijon.fr/dot/svg/digraph{
fontname = "Bitstream Vera Sans";
fontsize = 8;
node [fontname = "Bitstream Vera Sans";fontsize = 8;shape = "record";];
edge [fontname = "Bitstream Vera Sans";fontsize = 8;];
Sequence [label = "{Sequence | +data : string \\l +comment : string \\l | +gc\(\) : float}"];
Genome [label = "{Genome | +seqs:Sequence[] \\l +annotation:Annotation}"];
Sequence -> Genome;
})The list of avaible:
* [engine](http://ggraph.pierre.marijon.fr/engine) in json format
* [output format](http://ggraph.pierre.marijon.fr/format) in json format## Production setup
For run ggraph in production you can use this configuration file.
### Systemd
[Unit]
Description=SVG graph generator
After=network.target
Requires=network.target[Service]
User=youruser
Group=yourgroup
WorkingDirectory=/path/to/ggraph
Environement="PATH=/path/to/ggraph/env/bin"
ExecStart=/path/to/ggraph/env/bin/gunicorn --workers 3 -bind unix:ggraph.sock -m 007 ggraph:app
Restart=always[Install]
WantedBy=multi-user.target### nginx
server
{
listen 80;server_name ggraph.hostname;
location /
{
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://unix:/path/to/ggraph/ggraph.sock;
}
}## Contribute
Please fork and propose pull requests.
## Bug
You can report bug on [github](https://github.com/natir/ggraph/issues)