openalex-local 0.1.0__py3-none-any.whl → 0.3.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. openalex_local/__init__.py +54 -3
  2. openalex_local/__main__.py +6 -0
  3. openalex_local/_cache/__init__.py +45 -0
  4. openalex_local/_cache/core.py +298 -0
  5. openalex_local/_cache/export.py +100 -0
  6. openalex_local/_cache/models.py +17 -0
  7. openalex_local/_cache/utils.py +85 -0
  8. openalex_local/_cli/__init__.py +9 -0
  9. openalex_local/_cli/cli.py +409 -0
  10. openalex_local/_cli/cli_cache.py +220 -0
  11. openalex_local/_cli/mcp.py +210 -0
  12. openalex_local/_cli/mcp_server.py +235 -0
  13. openalex_local/_core/__init__.py +42 -0
  14. openalex_local/_core/api.py +376 -0
  15. openalex_local/_core/config.py +120 -0
  16. openalex_local/_core/db.py +214 -0
  17. openalex_local/_core/export.py +252 -0
  18. openalex_local/_core/fts.py +165 -0
  19. openalex_local/_core/models.py +432 -0
  20. openalex_local/_remote/__init__.py +34 -0
  21. openalex_local/_remote/base.py +256 -0
  22. openalex_local/_server/__init__.py +117 -0
  23. openalex_local/_server/routes.py +175 -0
  24. openalex_local/aio.py +259 -0
  25. openalex_local/cache.py +31 -0
  26. openalex_local/cli.py +8 -0
  27. openalex_local/jobs.py +169 -0
  28. openalex_local/remote.py +8 -0
  29. openalex_local/server.py +8 -0
  30. openalex_local-0.3.1.dist-info/METADATA +288 -0
  31. openalex_local-0.3.1.dist-info/RECORD +34 -0
  32. {openalex_local-0.1.0.dist-info → openalex_local-0.3.1.dist-info}/WHEEL +1 -1
  33. openalex_local-0.3.1.dist-info/entry_points.txt +2 -0
  34. openalex_local/config.py +0 -73
  35. openalex_local/models.py +0 -187
  36. openalex_local-0.1.0.dist-info/METADATA +0 -152
  37. openalex_local-0.1.0.dist-info/RECORD +0 -8
  38. openalex_local-0.1.0.dist-info/entry_points.txt +0 -2
  39. {openalex_local-0.1.0.dist-info → openalex_local-0.3.1.dist-info}/top_level.txt +0 -0
@@ -1,152 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: openalex-local
3
- Version: 0.1.0
4
- Summary: Local OpenAlex database with 284M+ works, abstracts, and semantic search
5
- Author-email: Yusuke Watanabe <ywatanabe@alumni.u-tokyo.ac.jp>
6
- License: AGPL-3.0
7
- Project-URL: Homepage, https://github.com/ywatanabe1989/openalex-local
8
- Project-URL: Repository, https://github.com/ywatanabe1989/openalex-local
9
- Keywords: openalex,academic,research,abstracts,semantic-search
10
- Classifier: Development Status :: 3 - Alpha
11
- Classifier: Intended Audience :: Science/Research
12
- Classifier: License :: OSI Approved :: GNU Affero General Public License v3
13
- Classifier: Programming Language :: Python :: 3
14
- Classifier: Programming Language :: Python :: 3.10
15
- Classifier: Programming Language :: Python :: 3.11
16
- Classifier: Programming Language :: Python :: 3.12
17
- Classifier: Topic :: Scientific/Engineering
18
- Requires-Python: >=3.10
19
- Description-Content-Type: text/markdown
20
- Requires-Dist: click>=8.0
21
- Requires-Dist: awscli>=1.0
22
- Provides-Extra: dev
23
- Requires-Dist: pytest>=7.0; extra == "dev"
24
- Requires-Dist: pytest-cov>=4.0; extra == "dev"
25
-
26
- # OpenAlex Local
27
-
28
- Local OpenAlex database with 284M+ scholarly works, abstracts, and semantic search.
29
-
30
- [![Python](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
31
- [![License](https://img.shields.io/badge/license-AGPL--3.0-blue.svg)](LICENSE)
32
-
33
- <details>
34
- <summary><strong>Why OpenAlex Local?</strong></summary>
35
-
36
- **Built for the LLM era** - features that matter for AI research assistants:
37
-
38
- | Feature | Benefit |
39
- |---------|---------|
40
- | 📚 **284M Works** | More coverage than CrossRef |
41
- | 📝 **Abstracts** | ~45-60% availability for semantic search |
42
- | 🏷️ **Concepts & Topics** | Built-in classification |
43
- | 👤 **Author Disambiguation** | Linked to institutions |
44
- | 🔓 **Open Access Info** | OA status and URLs |
45
-
46
- Perfect for: RAG systems, research assistants, literature review automation.
47
-
48
- </details>
49
-
50
- <details>
51
- <summary><strong>Installation</strong></summary>
52
-
53
- ```bash
54
- pip install openalex-local
55
- ```
56
-
57
- From source:
58
- ```bash
59
- git clone https://github.com/ywatanabe1989/openalex-local
60
- cd openalex-local && make install
61
- ```
62
-
63
- Database setup (~300 GB, ~1-2 days to build):
64
- ```bash
65
- # Check system status
66
- make status
67
-
68
- # 1. Download OpenAlex Works snapshot (~300GB)
69
- make download-screen # runs in background
70
-
71
- # 2. Build SQLite database
72
- make build-db
73
-
74
- # 3. Build FTS5 index
75
- make build-fts
76
- ```
77
-
78
- </details>
79
-
80
- <details>
81
- <summary><strong>Python API</strong></summary>
82
-
83
- ```python
84
- from openalex_local import search, get, count
85
-
86
- # Full-text search (title + abstract)
87
- results = search("machine learning neural networks")
88
- for work in results:
89
- print(f"{work.title} ({work.year})")
90
- print(f" Abstract: {work.abstract[:200]}...")
91
- print(f" Concepts: {[c['name'] for c in work.concepts]}")
92
-
93
- # Get by OpenAlex ID or DOI
94
- work = get("W2741809807")
95
- work = get("10.1038/nature12373")
96
-
97
- # Count matches
98
- n = count("CRISPR")
99
- ```
100
-
101
- </details>
102
-
103
- <details>
104
- <summary><strong>CLI</strong></summary>
105
-
106
- ```bash
107
- openalex-local search "CRISPR genome editing" -n 5
108
- openalex-local get W2741809807
109
- openalex-local get 10.1038/nature12373
110
- openalex-local count "machine learning"
111
- ```
112
-
113
- </details>
114
-
115
- <details>
116
- <summary><strong>Related Projects</strong></summary>
117
-
118
- **[crossref-local](https://github.com/ywatanabe1989/crossref-local)** - Sister project with CrossRef data:
119
-
120
- | Feature | crossref-local | openalex-local |
121
- |---------|----------------|----------------|
122
- | Works | 167M | 284M |
123
- | Abstracts | ~21% | ~45-60% |
124
- | Update frequency | Real-time | Monthly |
125
- | DOI authority | ✓ (source) | Uses CrossRef |
126
- | Citations | Raw references | Linked works |
127
- | Concepts/Topics | ❌ | ✓ |
128
- | Author IDs | ❌ | ✓ |
129
- | Best for | DOI lookup, raw refs | Semantic search |
130
-
131
- **When to use CrossRef**: Real-time DOI updates, raw reference parsing, authoritative metadata.
132
- **When to use OpenAlex**: Semantic search, citation analysis, topic discovery.
133
-
134
- </details>
135
-
136
- <details>
137
- <summary><strong>Data Source</strong></summary>
138
-
139
- Data from [OpenAlex](https://openalex.org/), an open catalog of scholarly works.
140
- Updated monthly from their [snapshot](https://docs.openalex.org/download-all-data/openalex-snapshot).
141
-
142
- </details>
143
-
144
- ---
145
-
146
- <p align="center">
147
- <a href="https://scitex.ai"><img src="docs/scitex-icon-navy-inverted.png" alt="SciTeX" width="40"/></a>
148
- <br>
149
- AGPL-3.0 · ywatanabe@scitex.ai
150
- </p>
151
-
152
- <!-- EOF -->
@@ -1,8 +0,0 @@
1
- openalex_local/__init__.py,sha256=WwenwvcOpwFgb8bTZVtXKMOePQ5H4yWUXj2oGfUSsvY,422
2
- openalex_local/config.py,sha256=O8NNqgXbmXx_Frjh7DLdHZ88Y6Qo3TkKzVji4TFNLjo,2046
3
- openalex_local/models.py,sha256=rMDPNbeAw98tNAerOTA1WB_Ei73i-M4HTpp9N55vQPE,5837
4
- openalex_local-0.1.0.dist-info/METADATA,sha256=iq6ZDmV7-Hneq2UpZdWut8fUDPogThGvzkpN1E72cwE,4384
5
- openalex_local-0.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
6
- openalex_local-0.1.0.dist-info/entry_points.txt,sha256=OYO9RohYQ52zoeb-jTjhMYR07F0PioGQXPizMnBv_Es,59
7
- openalex_local-0.1.0.dist-info/top_level.txt,sha256=arEhuDR1f42p7soJ5JkJFAnAiCPSGKvuHIchaKTmqKg,15
8
- openalex_local-0.1.0.dist-info/RECORD,,
@@ -1,2 +0,0 @@
1
- [console_scripts]
2
- openalex-local = openalex_local.cli:main