Skip to content

GiulioRossetti/cdlib_rest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CDlib-Rest - Community Discovery Library REST Service.

This project offers a REST interface for the cdlib Python library.

Tools

  • REST service: cdlib_rest/cdlib_server.py
  • Python REST client: cdlib_rest/cdlib_client.py

REST service setup

Local testing

python cdlib_rest/cdlib_server.py

In order to change the binding IP/port modify the cdlib_server.py file.

Client API

To query cdlib_rest import the API in your application and use the following template:

import networkx as nx
from cdlib_rest import CDlib_API

with CDlib_API("http://0.0.0.0", 8081) as api:
    
    g = nx.karate_club_graph()
    api.load_network(g)

    coms = api.demon(epsilon=0.25)
    stats = api.fitness_scores([coms], summary=False)
           

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages