Skip to content

mbelchin/cargomedia_social_graph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

cargomedia_social_graph

Small tests for CargoMedia Social Graph using different approaches and technologies

Python and mongoDB Example

Requirements for Python-mongDB sample

  • Python
  • mongoDB
  • pymongo

Usage

Get Usage Information:

python social_graph.py --help

python social_graph.py -h

Load JSON file data into mongoDB:

python social_graph.py --load [JSON_FILE]

python social_graph.py -l data.json

Get UserId (1) information:

python social_graph.py --info [USER_ID]

python social_graph.py -i 1

Get UserId (1) friends:

python social_graph.py --friends [USER_ID]

python social_graph.py -f 1

Get UserId (1) friends of friends:

python social_graph.py --friends_of_friends [USER_ID]

python social_graph.py -o 1

Get UserId (1) suggested friends:

python social_graph.py --suggested_friends [USER_ID]

python social_graph.py -s 1

Tests

Run tests using:

python -m doctest social_graph.py

Or:

python -m doctest -v social_graph.py

About

Small test for CargoMedia

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages