Skip to main content

wiki2neo

PyPI version shields.io

Produce Neo4j import CSVs from Wikipedia database dumps to build a graph of links between Wikipedia pages.

Installation

$ pip install wiki2neo

Usage

Usage: wiki2neo [OPTIONS] [WIKI_XML_INFILE]

  Parse Wikipedia pages-articles-multistream.xml dump into two Neo4j import
  CSV files:

      Node (Page) import, headers=["title:ID", "id"]
      Relationships (Links) import, headers=[":START_ID", ":END_ID"]

  Reads from stdin by default, pass [WIKI_XML_INFILE] to read from file.

Options:
  -p, --pages-outfile FILENAME  Node (Pages) CSV output file  [default:pages.csv]
  -l, --links-outfile FILENAME  Relationships (Links) CSV output file [default: links.csv]
  --help                        Show this message and exit.

Import resulting CSVs into Neo4j:
$ neo4j-admin import --nodes:Page pages.csv \
        --relationships:LINKS_TO links.csv \
        --ignore-duplicate-nodes --ignore-missing-nodes --multiline-fields

Downloads from Wikipedia are in compressed xml.bz2 format. Simplest usage is to pip extraction output straight into wiki2neo:

$ bzcat pages-articles-multistream.xml.dz2 | wiki2neo

Metadata

Release files for wiki2neo 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wiki2neo 0.0.3
File Size Uploaded Provenance Actions
wiki2neo-0.0.3.tar.gz 2.7 kB Without provenance Details for wiki2neo-0.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for wiki2neo 0.0.3
File Interpreter ABI Platform Actions
wiki2neo-0.0.3-py2.py3-none-any.whl Python 2, Python 3 none any Details for wiki2neo-0.0.3-py2.py3-none-any.whl

Total release size: 4.8 kB

Release files / wiki2neo-0.0.3.tar.gz

Download URL wiki2neo-0.0.3.tar.gz
Size 2.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b5aa13d070b7bb184c663b873de121e240fb0e1db18ec55bba32915a2302733d
BLAKE2b-256 checksum
How to use checksums
42bf0aafbbffef69b36aacf69afc5177eceebd262f9122461224d35ab596e0ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

Release files / wiki2neo-0.0.3-py2.py3-none-any.whl

Download URL wiki2neo-0.0.3-py2.py3-none-any.whl
Size 2.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
be81aa623ad52ead3415a26bb2fcaa3ad1e72173c516f9f2512485a163c01090
BLAKE2b-256 checksum
How to use checksums
a95a93dc8634b60808a00fa2b8eab2e54e48fa396817c27c1e653ed11fbf7885
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

Security for wiki2neo 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page