{ "info": { "author": "BlueBrain Project, EPFL", "author_email": "tristan.carel@epfl.ch", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console :: Curses", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)", "Operating System :: MacOS", "Operating System :: POSIX :: Linux", "Programming Language :: C++", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Database :: Database Engines/Servers" ], "description": "![basalt logo](https://github.com/BlueBrain/basalt/raw/master/doc/source/_static/basalt-logo-400.png)\n\n# Basalt - Graph Storage API for C++ and Python\n\nBasalt is a graph storage API powered by RocksDB persistent\nkey-value store for fast storage like NVMe technologies.\n\n[![Build Status](https://api.travis-ci.com/BlueBrain/basalt.svg?token=p3ijqmiSc83uPHF74Ay8&branch=master)](https://travis-ci.org/BlueBrain/basalt)\n\nDocumentation is currently hosted on GitHub: [https://bluebrain.github.io/basalt]\n\n# Development stage\n\nThe C++ and Python APIs of Basalt are stable already, but substantial additions might come in the future. Thus this library development status is still beta.\n\n# Usage\n\n## Python\n\n### Graph Topology API\n\n```python\nclass PLInfluences(basalt.GraphTopology):\n \"\"\"A directed graph where vertices are programming languages.\n \"\"\"\n directed(True)\n\n class Vertex(Enum):\n LANGUAGE = 1\n\n vertex(\"language\", Vertex.LANGUAGE)\n edge(Vertex.LANGUAGE, Vertex.LANGUAGE, name=\"influenced\", plural=\"influenced\")\n\n @classmethod\n def load_from_dbpedia(cls):\n # [...]\n\ng = PLInfluences.load_from_dbpedia(\"/path/on/disk\")\nfor language in g.languages:\n print(language.id, language.data())\n for influenced in language.influenced:\n print(\" \", influenced.data())\n```\n\n### Python bindings\n\n```python\ng = basalt.UndirectedGraph(\"/path/on/disk\")\ng.vertices.add((0, 1)) # vertex type=0 id=1\ng.vertices.add(numpy.full((10,), 1, dtype=numpy.int32), # types\n numpy.arange(10, dtype=numpy.int64)) # ids\ng.edges.add((0, 1), (1, 0))\ng.edges.add((0, 1),\n numpy.full(9,), 1, dtype=numpy.int32),\n numpy.arange(9, dtype=numpy.int64)\ng.commit()\n```\n\n## C++\n\n```cpp\nbasalt::UndirectedGraph g(\"/path/on/disk\");\ng.vertices().insert({0, 1});\ng.vertices().insert({0, 2});\nfor (const auto& vertex: g.vertices()) {\n std::clog << vertex << '\\n';\n}\nfor (const auto& edge: g.edges()) {\n std::clog << edge.first << \" -> \" << edge.second << '\\n';\n}\ng.commit();\n```\n\n# Installation\n\n## C++ API\n\n### Conan package\n\nThis repository provides a [Conan](https://conan.io/) package to ease integration into your existing projects.\n\n### CMake\n\nIt is also possible to build and install the library using CMake, see [build section](#manual-build-and-installation-instructions) below.\n\n## Python API\n\n### Pypi\n\nPython bindings of Basalt are available on [Pypi](https://pypi.org/simple/basalt).\n\n### Blue Brain 5 supercomputer\n\nBasalt is currently released as module on Blue Brain 5 supercomputer:\n\n```bash\n$ module purge\n$ . /gpfs/bbp.cscs.ch/apps/hpc/jenkins/config/modules.sh\n$ module load py-basalt\n$ python3\nPython 3.6.3 (default, Oct 3 2017, 07:47:49)\n[GCC 6.4.0] on linux\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n>>> import basalt\n>>> basalt.__version__\n'0.2.2'\n>>> basalt.__rocksdb_version__\n'5.17.2'\n```\n\n# Manual build and installation instructions\n\n## Requirements\n\n* [CMake](https://cmake.org) build system, version 3.5.1 or higher.\n* [RocksDB](https://rocksdb.org/), a persistent key-value store,\n version 4.1.1 or higher.\n* [Python 3](https://python.org/), version 3.5 or higher.\n\n## Getting the code\n\nThis repository grabs a few third-party libraries as *git modules*.\nTo clone them when you clone basalt, use `git clone --recursive` option.\n\nIf you have already cloned basalt, you can get the git submodules with\nthe command:\n`git submodule update --recursive --init`\n\n## Building the library 101\n\n### C++ Library only\n\nTo build the basalt C++ shared library and run the tests:\n```sh\ncd /path/to/basalt\nmkdir build\npushd build\ncmake ..\nCTEST_OUTPUT_ON_FAILURE=1 make all test\n```\n\nTo install the library:\n```sh\npushd build\ncmake -DCMAKE_INSTALL_PREFIX=/usr/local .\nmake all install\n```\n\n### Python 3 bindings\n\nTo build and run the tests:\n\n```sh\ncd /path/to/basalt\npython3 setup.py test\n```\n\nTo install the package:\n* with _pip_: `pip3 install -U .`\n* with _distutils_: `python3 setup.py install`\n* to create binary tarballs:\n * most simple: `python3 setup.py bdist`\n * [wheel](https://www.python.org/dev/peps/pep-0427/): `pip3 install wheel; python3 setup.py bdist_wheel`\n * relocatable archive: `python3 setup.py bdist_dumb --relative`\n\n## CMake variables and targets\n\nMain CMake variables:\n\n* `Basalt_FORMATTING:BOOL`: provide the build target `clang-format` to check C++ code formatting\n* `Basalt_STATIC_ANALYSIS:BOOL`: provide the build target `clang-tidy` to perform static analysis of the C++ code\n* `Basalt_ARCH`: value given to the `-m` compiler option. \"native\" for instance\n* `Basalt_PRECOMMIT:BOOL`: Enable automatic checks before git commits\n* `Basalt_CXX_OPTIMIZE:BOOL`: Compile C++ with optimization\n* `Basalt_CXX_SYMBOLS:BOOL`: Compile C++ with debug symbols\n* `Basalt_CXX_WARNINGS:BOOL=ON`: Compile C++ with warnings\n\nFor a more detailed list, please refer to file `CMakeCache.txt` in CMake build directory.\n\nCMake targets:\n\n* `basalt`: build the pure C++ library (without Python bindings)\n* `_basalt`: build the C++ library with Python bindings\n* `unit-tests`: build a C++ executable testing the C++ pure library\n* `all`: build the 3 targets above\n* `test`: execute the tests. It is recommended to execute the command `ctest --output-on-failure -VV` instead\n* `install`: install the pure C++ library and the CMake configuration required to easily use basalt\n in another CMake project\n\n## Python setuptools commands\n\nHere are the main Python setuptools commands available.\n\n* `build`: build native library\n* `test`: build and test the package. It also executes the C++ unit-tests as well as the code snippets in the Sphinx documentation.\n* `install`: install the Python package\n* `doctest`: execute the code snippets in the Sphinx documentation\n* `build_sphinx`: build the Sphinx documentation\n\nFor instance: `python3 setup.py build_sphinx`\n\n# Files Layout\n\n```\n\u251c\u2500\u2500 basalt ................... python code of the package\n\u251c\u2500\u2500 cmake\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 hpc-coding-conventions git module for C++ code guidelines\n\u251c\u2500\u2500 dev ...................... development related scripts\n\u251c\u2500\u2500 doc ...................... sphinx documentation source code\n\u251c\u2500\u2500 include\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 basalt ............... public headers of the C++ library\n\u251c\u2500\u2500 README.md ................ that's me!\n\u251c\u2500\u2500 src\n\u2502\u00a0\u00a0 \u251c\u2500\u2500 basalt ............... C++ library implementation\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 third_party .......... C++ libraries (mostly as git modules)\n\u2514\u2500\u2500 tests\n \u251c\u2500\u2500 benchmarks ........... scripts to execute before creating a git tag\n \u251c\u2500\u2500 py ................... python unit-tests\n \u2514\u2500\u2500 unit ................. C++ unit-tests using Catch2\n```\n\n# Embedded third-parties\n\nExternal libraries are including either by copy/paste or git submodules\nin `src/third_party` directory.\n\n* [Catch2](https://github.com/catchorg/Catch2):\n modern, C++-native, header-only, test framework for unit-tests, TDD\n and BDD unit-test library.\n* [fmt](https://github.com/fmtlib/fmt): A modern formatting library\n **(not part of CMake build yet)**\n* [pybind11](https://pybind11.rtfd.io): Seamless operability between C++11 and Python\n* [SpdLog](https://github.com/gabime/spdlog): Fast C++ logging library.\n\n# Contributing\n\nIf you want to improve the project or you see any issue, every contribution is welcome.\nPlease check [contribution guidelines](CONTRIBUTING.md) for more information.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "LGPLv3", "maintainer": "", "maintainer_email": "", "name": "basalt", "package_url": "https://pypi.org/project/basalt/", "platform": "", "project_url": "https://pypi.org/project/basalt/", "project_urls": null, "release_url": "https://pypi.org/project/basalt/0.2.7/", "requires_dist": null, "requires_python": ">=3.5", "summary": "Graph API powered by RocksDB persistent key-value store for fast storage", "version": "0.2.7" }, "last_serial": 5830499, "releases": { "0.2.6": [ { "comment_text": "", "digests": { "md5": "10c775ec83349952a8a03e370f409c46", "sha256": "d1d3f3dba5142175f5c9cec3d7927c7ce9f4eaffd2bc9079c6f1e23702c63494" }, "downloads": -1, "filename": "basalt-0.2.6.tar.gz", "has_sig": true, "md5_digest": "10c775ec83349952a8a03e370f409c46", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 929885, "upload_time": "2019-08-15T10:04:28", "url": "https://files.pythonhosted.org/packages/59/9e/7b0a9bce0c49ec565013b56e8822953742a9138ddba378cf95ac0ac71112/basalt-0.2.6.tar.gz" } ], "0.2.6.post1": [ { "comment_text": "", "digests": { "md5": "1f19cc0ea2a7f11e6f948d5e6af7dd77", "sha256": "a8a375e57d346775ac58e61f826d3df0d5b52199fa5d035015cfda7800735add" }, "downloads": -1, "filename": "basalt-0.2.6.post1.tar.gz", "has_sig": true, "md5_digest": "1f19cc0ea2a7f11e6f948d5e6af7dd77", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 1033636, "upload_time": "2019-08-15T12:53:20", "url": "https://files.pythonhosted.org/packages/69/46/3d8b9e7077aa34d3b2dc762980e6c3b0a0281b2529f6faa7d379a1752ffd/basalt-0.2.6.post1.tar.gz" } ], "0.2.6.post2": [ { "comment_text": "", "digests": { "md5": "7fead9c8c79878dfc6f81ad31b0452a3", "sha256": "4864af33260bc9fd4ed1a82a00572f439d8fa753f4d32caf7049e7ac18d59c4b" }, "downloads": -1, "filename": "basalt-0.2.6.post2.tar.gz", "has_sig": false, "md5_digest": "7fead9c8c79878dfc6f81ad31b0452a3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 930337, "upload_time": "2019-08-15T13:23:01", "url": "https://files.pythonhosted.org/packages/12/93/45c0a1b5edb7fc3a126f3422d89b911fb3f211e7f01edc78dac5209dc68c/basalt-0.2.6.post2.tar.gz" } ], "0.2.7": [ { "comment_text": "", "digests": { "md5": "b156b4948b0cb84b996cad89e70f70a6", "sha256": "08302aa0910b343dd39a4ee77770a7ec61e6038be4b060d19b9d1610aa534820" }, "downloads": -1, "filename": "basalt-0.2.7.tar.gz", "has_sig": true, "md5_digest": "b156b4948b0cb84b996cad89e70f70a6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 1182634, "upload_time": "2019-09-14T23:45:01", "url": "https://files.pythonhosted.org/packages/9d/29/bb3e9687cd12deee7b030a17728fd6a5be6ffaa5c3f836e4ab74c5697ec9/basalt-0.2.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b156b4948b0cb84b996cad89e70f70a6", "sha256": "08302aa0910b343dd39a4ee77770a7ec61e6038be4b060d19b9d1610aa534820" }, "downloads": -1, "filename": "basalt-0.2.7.tar.gz", "has_sig": true, "md5_digest": "b156b4948b0cb84b996cad89e70f70a6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 1182634, "upload_time": "2019-09-14T23:45:01", "url": "https://files.pythonhosted.org/packages/9d/29/bb3e9687cd12deee7b030a17728fd6a5be6ffaa5c3f836e4ab74c5697ec9/basalt-0.2.7.tar.gz" } ] }