MCPcopy Create free account

hub / github.com/internetarchive/openlibrary / functions

Functions6,179 in github.com/internetarchive/openlibrary

Functionmain
:param solr_base: Base URL of Solr instance :param workers: Number of workers to use :param page_size: Number of results to fetch per que
scripts/solr_dump_xisbn.py:116
Functionmain
(args)
scripts/cron_wrapper.py:46
Functionmain
(ol_config: str, batch_path: str)
scripts/partner_batch_imports.py:413
Functionmain
( ol_config: str, idfile: str | None = None, test: bool = True, )
scripts/bulk_load_ia_query.py:200
Functionmain
Useful environment variables: - OL_SOLR_BASE_URL: Override the Solr base URL - OL_SOLR_NEXT: Set to true if running with next version of
scripts/solr_updater/trending_updater.py:22
Functionmain
Script to initialize the trending data in Solr. Environment variables: OL_SOLR_BASE_URL: The base URL for the Solr instance. T
scripts/solr_updater/trending_updater_init.py:10
Functionmain
Useful environment variables: - OL_SOLR_BASE_URL: Override the Solr base URL - OL_SOLR_NEXT: Set to true if running with next version of
scripts/solr_updater/solr_updater.py:249
Functionmain
:param str ol_config: Path to openlibrary.yml file
scripts/providers/import_wikisource.py:865
Functionmain
(ol_config: str, batch_path: str, import_status: str = "staged")
scripts/providers/isbndb.py:226
Functionmain
:param cmd: Whether to do the index or just fetch end of the chunk :param job: Type to index. Orphans gets orphaned editions. :param post
scripts/solr_builder/solr_builder/solr_builder.py:385
Functionmain
(args)
scripts/migrations/update_legacy_preferences.py:64
Functionmain
(args)
scripts/migrations/write_prefs_to_store.py:123
Functionmain
(args)
scripts/migrations/anonymous_store_remediation.py:80
Functionmain
(args)
scripts/migrations/delete_merge_debug.py:46
Functionmain
()
scripts/monitoring/monitor.py:258
Functionmain
(openlibrary_yml: str, coverstore_yml: str, dry_run: bool = False)
openlibrary/coverstore/archive.py:478
Functionmain
()
openlibrary/plugins/openlibrary/home.py:95
Functionmain
Insert the documents with the given keys into Solr. :param keys: The keys of the items to update (ex: /books/OL1M) :param ol_url: URL of
openlibrary/solr/update.py:161
Functionmain
(infobase_config, openlibrary_config, coverstore_config, ndays=1)
openlibrary/admin/stats.py:120
Methodmake_author
(name, _, typ)
scripts/partner_batch_imports.py:281
Functionmake_index
Make index with "path", "title", "created" and "last_modified" columns.
openlibrary/data/dump.py:252
Functionmake_pd_org_query
Returns a list of items found in the "Qualifying Authorities for Print-Disabled Access" collection
openlibrary/plugins/openlibrary/pd.py:51
Methodmake_real
Replace the obscured IP with the real IP or append it in parentheses.
scripts/obfi/reveal.py:19
Functionmake_request
()
openlibrary/solr/utils.py:135
Functionmake_work
Take a dictionary and make it a work of web.Storage format. This is used as a wrapper for results from solr.select() when adding books from /
openlibrary/plugins/upstream/addbook.py:73
FunctionmapAPIResultToSuggestedItem
(r)
openlibrary/plugins/openlibrary/js/autocomplete.js:31
Functionmap_data
Maps Open Textbooks data to Open Library import record.
scripts/import_open_textbook_library.py:32
Methodmarc8
(self)
openlibrary/catalog/marc/tests/test_marc_binary.py:15
Methodmark_created
(self, ol_key)
openlibrary/core/imports.py:258
Methodmark_failed
(self, error)
openlibrary/core/imports.py:252
Methodmark_found
(self, ol_key)
openlibrary/core/imports.py:255
Methodmark_modified
(self, ol_key)
openlibrary/core/imports.py:261
Methodmc_add
(self, key, value, time=0)
openlibrary/plugins/openlibrary/connection.py:355
Methodmemcache
(self)
openlibrary/core/cache.py:77
Methodmemcache
(self)
openlibrary/core/cache.py:303
Functionmerge
(master, dupes)
openlibrary/components/MergeUI/utils.js:70
Functionmerge_authors_json
(_: LibrarianDep, data: MergeAuthorsBody)
openlibrary/fastapi/merge_authors.py:36
Methodmerge_docs
(self, master, dup)
openlibrary/plugins/upstream/merge_authors.py:140
Methodmerge_records
()
openlibrary/plugins/upstream/merge_authors.py:332
Methodmin_level
(self)
openlibrary/plugins/upstream/table_of_contents.py:18
Functionmock_async_run_solr_query
Mock async_run_solr_query function to avoid actual Solr calls. Used by FastAPI search/subjects endpoint tests.
openlibrary/tests/fastapi/conftest.py:114
Functionmock_authenticated_user
Provide an authenticated test user using FastAPI's dependency_overrides. This is the correct FastAPI way to override dependencies in tests. P
openlibrary/tests/fastapi/conftest.py:31
Functionmock_bestbook_model
Prevent real DB calls for Bestbook mutation methods.
openlibrary/tests/fastapi/test_bestbook.py:47
Functionmock_booknotes
Prevent real DB calls for Booknotes methods.
openlibrary/tests/fastapi/test_booknotes.py:9
Functionmock_bookshelves_model
()
openlibrary/tests/fastapi/test_work_bookshelves.py:34
Functionmock_dynlinks
Mock dynlinks.dynlinks to avoid database/network calls. This mock returns different formats based on the options passed: - When format="json"
openlibrary/tests/fastapi/test_books.py:19
Functionmock_fulltext_search
Mock the fulltext_search (sync) function to avoid actual Solr calls. Used by webpy search_inside endpoint tests.
openlibrary/tests/fastapi/conftest.py:103
Functionmock_fulltext_search_async
Mock fulltext_search_async function to avoid actual Solr calls. Used by FastAPI search/inside endpoint tests.
openlibrary/tests/fastapi/conftest.py:92
Functionmock_get
Mock for requests.get to always return seed=1234.
scripts/tests/test_obfi.py:16
Functionmock_get_availability
()
openlibrary/tests/fastapi/test_book_availability.py:11
Methodmock_get_availability_async
(id_type, ocaids)
openlibrary/tests/core/test_lending.py:12
Functionmock_get_metrics
Prevent real DB calls for get_observation_metrics.
openlibrary/tests/fastapi/test_public_observations.py:27
Functionmock_get_trending_books
()
openlibrary/tests/fastapi/test_trending.py:18
Functionmock_ia
pytest funcarg to mock openlibrary.core.ia module. from openlibrary.core import ia def test_ia(mock_ia): assert ia.get_metadata("foo
openlibrary/mocks/mock_ia.py:9
Methodmock_load
(lang: str)
openlibrary/tests/core/test_jinja.py:200
Functionmock_memcache
This patches all the existing memcache connections to use mock memcache instance.
openlibrary/mocks/mock_memcache.py:33
Functionmock_merge_engine
Mock the AuthorMergeEngine to avoid actual DB calls.
openlibrary/tests/fastapi/test_merge_authors.py:51
Functionmock_optional_authenticated_user
Override get_authenticated_user for endpoints that use optional auth. Use this fixture for endpoints that depend on get_authenticated_user (w
openlibrary/tests/fastapi/conftest.py:51
Functionmock_process_delete
Mock out the legacy process_delete method.
openlibrary/tests/fastapi/test_lists_delete.py:23
Functionmock_process_merge_request
Mock process_merge_request to avoid actual merge request creation.
openlibrary/tests/fastapi/test_merge_authors.py:65
Functionmock_ratings_model
Prevent real DB calls for Ratings methods.
openlibrary/tests/fastapi/test_ratings.py:9
Functionmock_readlinks
Mock readlinks.readlinks to avoid database/network calls.
openlibrary/tests/fastapi/test_books.py:39
Functionmock_request
(*args, **kwargs)
openlibrary/conftest.py:24
Functionmock_run_solr_query
Mock run_solr_query (sync) function to avoid actual Solr calls. Used by webpy search/subjects endpoint tests.
openlibrary/tests/fastapi/conftest.py:125
Functionmock_site
mock_site funcarg. Creates a mock site, assigns it to web.ctx.site and returns it.
openlibrary/mocks/mock_infobase.py:398
Functionmock_site
Mock out the site ContextVar.
openlibrary/tests/fastapi/test_lists_delete.py:9
Functionmock_site_for_get_list
Mock out the site ContextVar used in get_list function.
openlibrary/tests/fastapi/test_lists_delete.py:16
Functionmock_sleep
(*args, **kwargs)
openlibrary/conftest.py:32
Functionmock_upstream
Patch httpx.AsyncClient so no real network calls are made.
openlibrary/tests/fastapi/test_cdn.py:10
Functionmock_user
()
openlibrary/plugins/upstream/tests/test_addbook.py:15
Functionmock_work_search
Mock the work_search (sync) function to avoid actual Solr calls. Used by webpy endpoint tests.
openlibrary/tests/fastapi/conftest.py:81
Functionmock_work_search
Alias for backward compatibility with existing tests.
openlibrary/tests/fastapi/test_search.py:20
Functionmock_work_search_async
Mock the work_search_async function to avoid actual Solr calls. Used by FastAPI endpoint tests.
openlibrary/tests/fastapi/conftest.py:70
Functionmonitor_empty_homepage
()
scripts/monitoring/monitor.py:216
Functionmonitor_fail2ban
Logs fail2ban nginx-429 jail stats (currently failed and banned counts).
scripts/monitoring/monitor.py:230
Functionmonitor_nginx_logs
Logs recent bot traffic, HTTP statuses, and top IP counts.
scripts/monitoring/monitor.py:48
Functionmonitor_partner_useragents
()
scripts/monitoring/monitor.py:101
Functionmonitor_solr
()
scripts/monitoring/monitor.py:79
Functionmonitor_solr_updater_lag
()
scripts/monitoring/monitor.py:253
Functionmonkeytime
(monkeypatch)
openlibrary/conftest.py:68
Functionmonthly_logins
Return the cached unique monthly login count for the admin stats UI.
openlibrary/fastapi/internal/api.py:497
Methodmost_followed
(cls, limit=100)
openlibrary/core/follows.py:167
Methodmost_notable_books
Across all patrons
openlibrary/core/booknotes.py:55
Functionmy_books_dropper_lists_partial
Get MyBooks dropper lists HTML and list data for the current user. Returns: - dropper: HTML string for the dropper lists component -
openlibrary/fastapi/partials.py:118
Methodname
(self)
openlibrary/plugins/openlibrary/status.py:258
Methodname
(self)
openlibrary/solr/updater/list.py:122
Methodname
(self)
openlibrary/solr/updater/author.py:76
Methodneeds_unique_url
(mr_type)
openlibrary/plugins/upstream/edits.py:158
Functionnew
( category, olid, filename, filename_s, filename_m, filename_l, author, ip,
openlibrary/coverstore/db.py:27
Methodnew
Creates a new thing in memory.
openlibrary/mocks/mock_infobase.py:297
Functionnew_import
(monkeypatch)
openlibrary/catalog/add_book/tests/test_load_book.py:15
Methodnew_start_response
(status, headers)
openlibrary/core/middleware.py:35
Functionno_requests
(monkeypatch)
openlibrary/conftest.py:23
Functionno_sleep
(monkeypatch)
openlibrary/conftest.py:31
Methodnormalize_key
(self, key)
openlibrary/plugins/worksearch/publishers.py:80
Methodnormalize_key
(self, key)
openlibrary/plugins/worksearch/languages.py:116
Methodnormalize_pagination
(self)
openlibrary/fastapi/models.py:48
Methodnormalize_shelf_name
(shelf_name: str)
openlibrary/core/bookshelves.py:725
Functionnot_loggedin
Returns True if no user is logged in.
openlibrary/plugins/openlibrary/filters.py:32
Methodnumber_of_pages
(self)
openlibrary/solr/updater/edition.py:237
← previousnext →4,401–4,500 of 6,179, ranked by callers