huggingface_hub の API リファレンス
huggingface_hub (huggingface/huggingface_hub) の公開 API 225 件 —— クラス 87、関数 109、メソッド 29。実際のソースを静的解析して抽出した正確なシグネチャを掲載しています。
リポジトリ: huggingface/huggingface_hub
| 種別 | 件数 |
|---|---|
| クラス | 87 |
| 関数 | 109 |
| メソッド | 29 |
API 一覧
class
src.huggingface_hub._buckets.BucketInfoContains information about a bucket on the Hub.
class
src.huggingface_hub._buckets.BucketUrlDescribes a bucket URL on the Hub.
class
src.huggingface_hub._buckets.FilterMatcherMatches file paths against include/exclude patterns.
method
src.huggingface_hub._buckets.FilterMatcher.matches(path:str) -> boolCheck if a path should be included based on the filter rules.
class
src.huggingface_hub._buckets.SyncOperationRepresents a sync operation to be performed.
class
src.huggingface_hub._buckets.SyncPlanRepresents a complete sync plan.
class
src.huggingface_hub._hot_reload.sse_client.EventRepresentation of an event from the event stream.
class
src.huggingface_hub._hot_reload.sse_client.SSEClientImplementation of a SSE client.
class
src.huggingface_hub._jobs_api.JobAcceleratorContains information about a Job accelerator (GPU).
class
src.huggingface_hub._jobs_api.JobDurationsTiming breakdown for a Job, computed server-side.
class
src.huggingface_hub._jobs_api.JobHardwareInfoContains information about available Job hardware.
class
src.huggingface_hub._jobs_api.JobInfoContains information about a Job.
class
src.huggingface_hub._jobs_api.JobInitiatorContains information about what triggered a Job.
class
src.huggingface_hub._jobs_api.JobStageEnumeration of possible stage of a Job on the Hub.
class
src.huggingface_hub._jobs_api.ScheduledJobInfoContains information about a Job.
func
src.huggingface_hub._login.auth_list() -> NoneList all stored access tokens.
func
src.huggingface_hub._login.auth_switch(token_name:str, add_to_git_credential:bool=False) -> NoneSwitch to a different access token.
func
src.huggingface_hub._login.login(token:str | None=None, *add_to_git_credential:bool=False, *skip_if_logged_in:bool=True) -> NoneLogin the machine to access the Hub.
func
src.huggingface_hub._login.logout(token_name:str | None=None) -> NoneLogout the machine from the Hub.
class
src.huggingface_hub._oauth.OAuthInfoInformation about the OAuth login.
class
src.huggingface_hub._oauth.OAuthUserInfoInformation about a user logged in with OAuth.
func
src.huggingface_hub._oauth.oauth_login(request:fastapi.Request) -> RedirectResponseEndpoint that redirects to HF OAuth page.
func
src.huggingface_hub._oauth.oauth_logout(request:fastapi.Request) -> RedirectResponseEndpoint that logs out the user (e.g.
func
src.huggingface_hub._oauth.oauth_redirect_callback(request:fastapi.Request) -> RedirectResponseEndpoint that handles the OAuth callback.
class
src.huggingface_hub._oidc.ProviderCI providers that can mint an OIDC id token natively.
class
src.huggingface_hub._sandbox.FileEntryA file or directory inside a sandbox.
class
src.huggingface_hub._sandbox.SandboxAn isolated cloud machine running on Hugging Face Jobs.
method
src.huggingface_hub._sandbox.Sandbox.processes() -> List[SandboxProcess]List the background processes of this sandbox.
func
src.huggingface_hub._sandbox_cache.pool_cache_path(pool_id:str) -> PathPath of the cache file for `pool_id` (no I/O).
class
src.huggingface_hub._space_api.SpaceSearchResultA single result from the Spaces semantic search API.
class
src.huggingface_hub._space_api.SpaceSecretContains information about a secret of a Space.
class
src.huggingface_hub._space_api.SpaceStageEnumeration of possible stage of a Space on the Hub.
class
src.huggingface_hub._space_api.VolumeDescribes a volume to mount in a Space or Job container.
func
src.huggingface_hub.cli._city_game.run_city_game(repos:list[RepoStorageInfo]) -> NoneLaunch the interactive city explorer.
func
src.huggingface_hub.cli._cli_utils.parse_volumes(volumes:list[str] | None) -> 'list[Volume] | None'Parse volume specs from CLI arguments.
func
src.huggingface_hub.cli._file_listing.format_date(dt:datetime | None, human_readable:bool=False) -> strFormat a datetime to a readable date string.
func
src.huggingface_hub.cli._file_listing.format_size(size:int | float, human_readable:bool=False) -> strFormat a size in bytes.
func
src.huggingface_hub.cli._file_listing.list_repo_files_cmd(repo_id:str, repo_type:str, human_readable:bool, as_tree:bool, recursive:bool, revision:str | None, token:str | None) -> NoneList files in a repo on the Hub.
class
src.huggingface_hub.cli._framework.ArgumentDeclare a positional CLI argument, e.g.
class
src.huggingface_hub.cli._framework.OptionDeclare a CLI option, e.g.
class
src.huggingface_hub.cli._output.OutputOutput sink for the `hf` CLI.
method
src.huggingface_hub.cli._output.Output.confirm(message:str, *default:bool=False, *yes:bool=False, *confirm_param:str='--yes') -> NoneAsk for confirmation.
method
src.huggingface_hub.cli._output.Output.error(message:str) -> NonePrint an error to stderr (all modes).
method
src.huggingface_hub.cli._output.Output.hint(message:str) -> NonePrint a helpful hint to stderr (human: gray, json/agent: plain text).
method
src.huggingface_hub.cli._output.Output.log(message:str) -> NonePrint a text message to stderr (human: gray, json/agent: plain text).
method
src.huggingface_hub.cli._output.Output.result(message:str, **data:Any) -> NonePrint a success summary to stdout.
method
src.huggingface_hub.cli._output.Output.set_no_truncate(no_truncate:bool) -> NoneToggle off cell truncation for human table output.
method
src.huggingface_hub.cli._output.Output.table(items:Sequence[dict[str, Any]], *headers:list[str] | None=None, *id_key:str | None=None, *alignments:dict[str, str] | None=None) -> NonePrint tabular data to stdout.
method
src.huggingface_hub.cli._output.Output.text(msg:str | None=None, *human:str | None=None, *agent:str | None=None) -> NonePrint a free-form text message to stdout.
method
src.huggingface_hub.cli._output.Output.warning(message:str) -> NonePrint a non-fatal warning to stderr (all modes).
func
src.huggingface_hub.cli._skills.add_skill(skill_name:str, destination_root:Path, force:bool=False) -> PathResolve a marketplace skill by name and install it.
func
src.huggingface_hub.cli.auth.auth_list_cmd() -> NoneList all stored access tokens.
func
src.huggingface_hub.cli.auth.auth_logout(token_name:Annotated[str | None, Option(help='Name of token to logout')]=None) -> NoneLogout from a specific token.
func
src.huggingface_hub.cli.auth.auth_token() -> NonePrint the current access token to stdout.
func
src.huggingface_hub.cli.buckets.info(bucket_id:Annotated[str, Argument(help='Bucket ID: namespace/bucket_name or hf://buckets/namespace/bucket_name')], token:TokenOpt=None) -> NoneGet info about a bucket.
func
src.huggingface_hub.cli.cache.summarize_deletions(selected_by_repo:Mapping[CachedRepoInfo, frozenset[CachedRevisionInfo]]) -> CacheDeletionCountsSummarize deletions across repositories.
func
src.huggingface_hub.cli.discussions.discussion_diff(repo_id:RepoIdArg, num:DiscussionNumArg, repo_type:RepoTypeOpt=RepoType.model, token:TokenOpt=None) -> NoneShow the diff of a pull request.
func
src.huggingface_hub.cli.extensions.extension_exec(ctx:click.Context, name:Annotated[str, Argument(help='Extension name (with or without `hf-` prefix).')]) -> NoneExecute an installed extension.
func
src.huggingface_hub.cli.extensions.extension_list() -> NoneList installed extension commands.
func
src.huggingface_hub.cli.extensions.extension_remove(name:Annotated[str, Argument(help='Extension name to remove (with or without `hf-` prefix).')]) -> NoneRemove an installed extension.
func
src.huggingface_hub.cli.inference_endpoints.describe(name:NameArg, namespace:NamespaceOpt=None, token:TokenOpt=None) -> NoneGet information about an existing endpoint.
func
src.huggingface_hub.cli.inference_endpoints.list_catalog(token:TokenOpt=None) -> NoneList available Catalog models.
func
src.huggingface_hub.cli.inference_endpoints.pause(name:NameArg, namespace:NamespaceOpt=None, token:TokenOpt=None) -> NonePause an Inference Endpoint.
func
src.huggingface_hub.cli.inference_endpoints.scale_to_zero(name:NameArg, namespace:NamespaceOpt=None, token:TokenOpt=None) -> NoneScale an Inference Endpoint to zero.
func
src.huggingface_hub.cli.jobs.jobs_cancel(job_id:JobIdArg, namespace:NamespaceOpt=None, token:TokenOpt=None) -> NoneCancel a Job
func
src.huggingface_hub.cli.jobs.jobs_hardware() -> NoneList available hardware options for Jobs
func
src.huggingface_hub.cli.jobs.jobs_ssh(job_id:JobIdArg, identity_file:SshIdentityFileOpt=None, dry_run:SshDryRunOpt=False, namespace:NamespaceOpt=None, token:TokenOpt=None) -> NoneSSH into a running Job.
func
src.huggingface_hub.cli.jobs.scheduled_delete(scheduled_job_id:ScheduledJobIdArg, namespace:NamespaceOpt=None, token:TokenOpt=None) -> NoneDelete a scheduled Job.
func
src.huggingface_hub.cli.jobs.scheduled_resume(scheduled_job_id:ScheduledJobIdArg, namespace:NamespaceOpt=None, token:TokenOpt=None) -> NoneResume (unpause) a scheduled Job.
func
src.huggingface_hub.cli.jobs.scheduled_suspend(scheduled_job_id:ScheduledJobIdArg, namespace:NamespaceOpt=None, token:TokenOpt=None) -> NoneSuspend (pause) a scheduled Job.
func
src.huggingface_hub.cli.lfs.read_msg() -> dict | NoneRead Line delimited JSON from stdin.
func
src.huggingface_hub.cli.lfs.write_msg(msg:dict)Write out the message in Line delimited JSON.
func
src.huggingface_hub.cli.papers.papers_info(paper_id:Annotated[str, Argument(help="The arXiv paper ID (e.g. '2502.08025').")], token:TokenOpt=None) -> NoneGet info about a paper on the Hub.
func
src.huggingface_hub.cli.papers.papers_read(paper_id:Annotated[str, Argument(help="The arXiv paper ID (e.g. '2502.08025').")], token:TokenOpt=None) -> NoneRead a paper as markdown.
func
src.huggingface_hub.cli.papers.papers_search(query:Annotated[str, Argument(help='Search query string.')], limit:LimitOpt=20, token:TokenOpt=None) -> NoneSearch papers on the Hub.
func
src.huggingface_hub.cli.repos.tag_list(repo_id:RepoIdArg, token:TokenOpt=None, repo_type:RepoTypeOpt=RepoType.model) -> NoneList tags for a repo.
func
src.huggingface_hub.cli.skills.skills_list(token:TokenOpt=None) -> NoneList available skills from the Hugging Face marketplace.
func
src.huggingface_hub.cli.skills.skills_preview() -> NonePrint the generated `hf-cli` SKILL.md to stdout.
func
src.huggingface_hub.cli.spaces.secrets_ls(space_id:Annotated[str, Argument(help='The space ID (e.g. `username/repo-name`).')], token:TokenOpt=None) -> NoneList secrets for a Space.
func
src.huggingface_hub.cli.spaces.spaces_hardware(token:TokenOpt=None) -> NoneList available hardware options for Spaces.
func
src.huggingface_hub.cli.spaces.spaces_pause(space_id:Annotated[str, Argument(help='The space ID (e.g. `username/repo-name`).')], token:TokenOpt=None) -> NonePause a Space.
func
src.huggingface_hub.cli.spaces.spaces_templates(token:TokenOpt=None) -> NoneList the available Space templates.
func
src.huggingface_hub.cli.spaces.variables_ls(space_id:Annotated[str, Argument(help='The space ID (e.g. `username/repo-name`).')], token:TokenOpt=None) -> NoneList environment variables for a Space.
func
src.huggingface_hub.cli.spaces.volumes_ls(space_id:Annotated[str, Argument(help='The space ID (e.g. `username/repo-name`).')], token:TokenOpt=None) -> NoneList volumes mounted in a Space.
func
src.huggingface_hub.cli.spaces.volumes_set(space_id:Annotated[str, Argument(help='The space ID (e.g. `username/repo-name`).')], volume:VolumesOpt=None, token:TokenOpt=None) -> NoneSet (replace) volumes for a Space.
func
src.huggingface_hub.cli.system.env() -> NonePrint information about the environment.
func
src.huggingface_hub.cli.system.update() -> NoneUpdate the `hf` CLI to the latest version.
func
src.huggingface_hub.cli.system.version() -> NonePrint information about the hf version.
func
src.huggingface_hub.cli.webhooks.webhooks_disable(webhook_id:Annotated[str, Argument(help='The ID of the webhook to disable.')], token:TokenOpt=None) -> NoneDisable an active webhook.
func
src.huggingface_hub.cli.webhooks.webhooks_enable(webhook_id:Annotated[str, Argument(help='The ID of the webhook to enable.')], token:TokenOpt=None) -> NoneEnable a disabled webhook.
func
src.huggingface_hub.cli.webhooks.webhooks_info(webhook_id:Annotated[str, Argument(help='The ID of the webhook.')], token:TokenOpt=None) -> NoneShow full details for a single webhook.
func
src.huggingface_hub.cli.webhooks.webhooks_ls(token:TokenOpt=None) -> NoneList all webhooks for the current user.
class
src.huggingface_hub.community.DiscussionA Discussion or Pull Request on the Hub.
method
src.huggingface_hub.community.Discussion.url() -> strReturns the URL of the discussion on the Hub.
class
src.huggingface_hub.community.DiscussionCommentA comment in a Discussion / Pull Request.
method
src.huggingface_hub.community.DiscussionComment.edit_history() -> list[dict]The edit history of the comment
method
src.huggingface_hub.community.DiscussionComment.last_edited_at() -> datetimeThe last edit time, as a `datetime` object.
method
src.huggingface_hub.community.DiscussionComment.last_edited_by() -> strThe last edit time, as a `datetime` object.
method
src.huggingface_hub.community.DiscussionComment.rendered() -> strThe rendered comment, as a HTML string
class
src.huggingface_hub.community.DiscussionCommitA commit in a Pull Request.
class
src.huggingface_hub.community.DiscussionEventAn event in a Discussion or Pull Request.
class
src.huggingface_hub.community.DiscussionStatusChangeA change of status in a Discussion / Pull Request.
class
src.huggingface_hub.community.DiscussionTitleChangeA rename event in a Discussion / Pull Request.
class
src.huggingface_hub.community.DiscussionWithDetailsSubclass of [`Discussion`].
func
src.huggingface_hub.community.deserialize_event(event:dict) -> DiscussionEventInstantiates a [`DiscussionEvent`] from a dict
func
src.huggingface_hub.constants.is_offline_mode() -> boolReturns whether we are in offline mode for the Hub.
func
src.huggingface_hub.dataclasses.init_with_validate(self, *args, **kwargs) -> NoneRun class validators after initialization.
func
src.huggingface_hub.dataclasses.type_validator(name:str, value:Any, expected_type:Any) -> NoneValidate that 'value' matches 'expected_type'.
func
src.huggingface_hub.dataclasses.validate(self:T) -> NoneRun class validators on the instance.
class
src.huggingface_hub.errors.CLIErrorCLI error with clean message (no traceback by default).
class
src.huggingface_hub.errors.CLIExtensionInstallErrorError during CLI extension installation.
class
src.huggingface_hub.errors.DDUFCorruptedFileErrorException thrown when the DDUF file is corrupted.
class
src.huggingface_hub.errors.DDUFErrorBase exception for errors related to the DDUF format.
class
src.huggingface_hub.errors.DDUFExportErrorBase exception for errors during DDUF export.
class
src.huggingface_hub.errors.DDUFInvalidEntryNameErrorException thrown when the entry name is invalid.
class
src.huggingface_hub.errors.FileDuplicationErrorRaised when duplicating files across repos fails.
class
src.huggingface_hub.errors.HfUriErrorRaised when an `hf://...` URI is malformed.
class
src.huggingface_hub.errors.LocalTokenNotFoundErrorRaised if local token is required but not found.
class
src.huggingface_hub.errors.NotASafetensorsRepoErrorRaised when a repo is not a Safetensors repo i.e.
class
src.huggingface_hub.errors.StrictDataclassErrorBase exception for strict dataclasses.
class
src.huggingface_hub.errors.TextGenerationErrorGeneric error raised if text-generation went wrong.
class
src.huggingface_hub.errors.ValidationErrorServer-side validation error.
class
src.huggingface_hub.inference._client.InferenceClientInitialize a new Inference Client.
method
src.huggingface_hub.inference._client.InferenceClient.get_endpoint_info(*model:str | None=None) -> dict[str, Any]Get information about the deployed endpoint.
method
src.huggingface_hub.inference._client.InferenceClient.health_check(model:str | None=None) -> boolCheck the health of the deployed endpoint.
method
src.huggingface_hub.inference._client.InferenceClient.image_to_text(image:ContentT, *model:str | None=None) -> ImageToTextOutputTakes an input image and return text.
class
src.huggingface_hub.inference._common.MimeBytesA bytes object with a mime type.
class
src.huggingface_hub.inference._generated._async_client.AsyncInferenceClientInitialize a new Inference Client.
method
src.huggingface_hub.inference._generated._async_client.AsyncInferenceClient.close()Close the client.
method
src.huggingface_hub.inference._generated._async_client.AsyncInferenceClient.health_check(model:str | None=None) -> boolCheck the health of the deployed endpoint.
method
src.huggingface_hub.inference._generated._async_client.AsyncInferenceClient.image_to_text(image:ContentT, *model:str | None=None) -> ImageToTextOutputTakes an input image and return text.
class
src.huggingface_hub.inference._generated.types.audio_to_audio.AudioToAudioInputInputs for Audio to Audio inference
class
src.huggingface_hub.inference._generated.types.base.BaseInferenceTypeBase class for all inference types.
class
src.huggingface_hub.inference._generated.types.chat_completion.ChatCompletionInputChat Completion Input.
class
src.huggingface_hub.inference._generated.types.chat_completion.ChatCompletionOutputChat Completion Output.
class
src.huggingface_hub.inference._generated.types.chat_completion.ChatCompletionStreamOutputChat Completion Stream Output.
class
src.huggingface_hub.inference._generated.types.depth_estimation.DepthEstimationInputInputs for Depth Estimation inference
class
src.huggingface_hub.inference._generated.types.feature_extraction.FeatureExtractionInputFeature Extraction Input.
class
src.huggingface_hub.inference._generated.types.fill_mask.FillMaskInputInputs for Fill Mask inference
class
src.huggingface_hub.inference._generated.types.image_to_image.ImageToImageInputInputs for Image To Image inference
class
src.huggingface_hub.inference._generated.types.image_to_image.ImageToImageTargetSizeThe size in pixels of the output image.
class
src.huggingface_hub.inference._generated.types.image_to_text.ImageToTextInputInputs for Image To Text inference
class
src.huggingface_hub.inference._generated.types.image_to_video.ImageToVideoInputInputs for Image To Video inference
class
src.huggingface_hub.inference._generated.types.object_detection.ObjectDetectionBoundingBoxThe predicted bounding box.
class
src.huggingface_hub.inference._generated.types.object_detection.ObjectDetectionInputInputs for Object Detection inference
class
src.huggingface_hub.inference._generated.types.summarization.SummarizationInputInputs for Summarization inference
class
src.huggingface_hub.inference._generated.types.text_generation.TextGenerationInputText Generation Input.
class
src.huggingface_hub.inference._generated.types.text_generation.TextGenerationOutputText Generation Output.
class
src.huggingface_hub.inference._generated.types.text_generation.TextGenerationStreamOutputText Generation Stream Output.
class
src.huggingface_hub.inference._generated.types.text_to_audio.TextToAudioInputInputs for Text To Audio inference
class
src.huggingface_hub.inference._generated.types.text_to_image.TextToImageInputInputs for Text To Image inference
class
src.huggingface_hub.inference._generated.types.text_to_speech.TextToSpeechInputInputs for Text To Speech inference
class
src.huggingface_hub.inference._generated.types.text_to_video.TextToVideoInputInputs for Text To Video inference
class
src.huggingface_hub.inference._generated.types.translation.TranslationInputInputs for Translation inference
class
src.huggingface_hub.inference._generated.types.zero_shot_object_detection.ZeroShotObjectDetectionBoundingBoxThe predicted bounding box.
func
src.huggingface_hub.inference._mcp.cli.run_agent(agent_path:Optional[str]) -> NoneTiny Agent loop.
class
src.huggingface_hub.inference._providers._common.AutoRouterConversationalTaskAuto-router for conversational tasks.
class
src.huggingface_hub.inference._providers._common.TaskProviderHelperBase class for task-specific provider helpers.
func
src.huggingface_hub.inference._providers.get_provider_helper(provider:PROVIDER_OR_POLICY_T | None, task:str, model:str | None) -> TaskProviderHelperGet provider helper instance by name and task.
class
src.huggingface_hub.inference._providers.hf_inference.HFInferenceTaskBase class for HF Inference API tasks.
class
src.huggingface_hub.inference._providers.together.TogetherTaskBase class for Together API tasks.
class
src.huggingface_hub.repocard_data.CardDataStructure containing metadata from a RepoCard.
method
src.huggingface_hub.repocard_data.CardData.get(key:str, default:Any=None) -> AnyGet value for a given metadata key.
method
src.huggingface_hub.repocard_data.CardData.pop(key:str, default:Any=None) -> AnyPop value for a given metadata key.
method
src.huggingface_hub.repocard_data.CardData.to_dict()Converts CardData to a dict.
class
src.huggingface_hub.serialization._dduf.DDUFEntryObject representing a file entry in a DDUF file.
method
src.huggingface_hub.serialization._dduf.DDUFEntry.as_mmap() -> Generator[bytes, None, None]Open the file as a memory-mapped file.
method
src.huggingface_hub.serialization._dduf.DDUFEntry.read_text(encoding:str='utf-8') -> strRead the file as text.
func
src.huggingface_hub.serialization._dduf.export_folder_as_dduf(dduf_path:str | os.PathLike, folder_path:str | os.PathLike) -> NoneExport a folder as a DDUF file.
func
src.huggingface_hub.utils._auth.get_token() -> str | NoneGet token if user is logged in.
func
src.huggingface_hub.utils._chunk_utils.chunk_iterable(iterable:Iterable[T], chunk_size:int) -> Iterable[Iterable[T]]Iterates over an iterator chunk by chunk.
class
src.huggingface_hub.utils._detect_agent.HarnessInfoA single harness entry.
func
src.huggingface_hub.utils._experimental.experimental(fn:Callable) -> CallableDecorator to flag a feature as experimental.
func
src.huggingface_hub.utils._fixes.WeakFileLock(lock_file:str | Path, *timeout:float | None=None) -> Generator[BaseFileLock, None, None]A filelock with some custom logic.
func
src.huggingface_hub.utils._http.async_hf_request_event_hook(request:httpx.Request) -> NoneAsync version of `hf_request_event_hook`.
func
src.huggingface_hub.utils._http.fix_hf_endpoint_in_url(url:str, endpoint:str | None) -> strReplace the default endpoint in a URL by a custom one.
func
src.huggingface_hub.utils._oauth_device.refresh_access_token(refresh_token:str) -> OAuthTokenResponseExchange a refresh token for a new access token.
func
src.huggingface_hub.utils._runtime.is_google_colab() -> boolReturn `True` if code is executed in a Google colab.
class
src.huggingface_hub.utils._safetensors.SafetensorsRepoMetadataMetadata for a Safetensors repo.
class
src.huggingface_hub.utils._safetensors.TensorInfoInformation about a tensor.
func
src.huggingface_hub.utils._subprocess.run_subprocess(command:str | list[str], folder:str | Path | None=None, check=True, **kwargs) -> subprocess.CompletedProcessMethod to run subprocesses.
class
src.huggingface_hub.utils._terminal.ANSIHelper for en.wikipedia.org/wiki/ANSI_escape_code
func
src.huggingface_hub.utils._terminal.select_choice(prompt:str, choices:list[str]) -> intSingle-choice interactive prompt.
func
src.huggingface_hub.utils._typing.is_jsonable(obj:Any, _visited:set[int] | None=None) -> boolCheck if an object is JSON serializable.
func
src.huggingface_hub.utils._typing.is_simple_optional_type(type_:type) -> boolCheck if a type is optional, i.e.
func
src.huggingface_hub.utils._typing.unwrap_simple_optional_type(optional_type:type) -> typeUnwraps a simple optional type, i.e.
func
src.huggingface_hub.utils._validators.validate_repo_id(repo_id:str | None) -> NoneValidate `repo_id` is valid.
class
src.huggingface_hub.utils._xet_progress_reporting.XetUploadProgressReporterReports on progress for Xet uploads.
func
src.huggingface_hub.utils.logging.disable_propagation() -> NoneDisable propagation of the library log outputs.
func
src.huggingface_hub.utils.logging.enable_propagation() -> NoneEnable propagation of the library log outputs.
func
src.huggingface_hub.utils.logging.get_logger(name:str | None=None) -> logging.LoggerReturns a logger with the specified name.
func
src.huggingface_hub.utils.logging.set_verbosity(verbosity:int) -> NoneSets the level for the HuggingFace Hub's root logger.
class
src.huggingface_hub.utils.tqdm.silent_tqdmFake tqdm object that does nothing.
func
utils._legacy_check_future_compatible_signatures.format_generated_code(code:str) -> strFormat some code with ruff.
func
utils.check_all_variable.check_static_all(update:bool) -> NoReturnCheck if __all__ is aligned with _SUBMOD_ATTRS or update it.
func
utils.check_all_variable.parse_all_definition(content:str) -> list[str]Extract the current __all__ contents from file content.
class
utils.check_task_parameters.AddImportsTransformer that adds import statements to the module.
method
utils.check_task_parameters.AddImports.leave_Module(original_node:cst.Module, updated_node:cst.Module) -> cst.ModuleInsert the import statements into the module.
method
utils.check_task_parameters.ModulesCollector.visit_ImportFrom(node:cst.ImportFrom)Map imported types to their modules.
class
utils.check_task_parameters.UpdateParametersUpdates a method's parameters, types, and docstrings.
func
utils.generate_async_inference_client.generate_async_client_code(code:str) -> strGenerate AsyncInferenceClient source code.
func
utils.generate_inference_types.check_inference_types(update:bool) -> NoReturnCheck and update inference types.
func
utils.generate_inference_types.fix_legacy_annotation(content:str) -> strFix legacy type annotations (e.g., `List` -> `list`).
func
utils.generate_inference_types.generate_reference_package(dataclasses:dict[str, list[str]], language:Literal['en', 'ko']) -> strGenerate the reference package content.
func
utils.helpers.format_source_code(code:str) -> strFormat the generated source code using Ruff.
func
utils.release_notes.fetch_prs.extract_pr_number(commit_message:str) -> int | NoneExtract PR number from a squash-merge commit message.
func
utils.release_notes.fetch_prs.fetch_doc_diffs(pr) -> list[dict]Extract diffs for .md files under docs/ from a PR.
func
utils.release_notes.fetch_prs.fetch_pr_details(repo, pr_number:int) -> dictFetch full details for a PR, including doc diffs.
func
utils.release_notes.fetch_prs.get_commits_since_tag(repo, tag_name:str) -> listGet all commits between a tag and HEAD on main.
func
utils.release_notes.fetch_prs.get_github_client() -> GithubGet authenticated GitHub client.
func
utils.release_notes.fetch_prs.save_manifest(pr_numbers:list[int], output_dir:Path) -> NoneSave manifest with all PR numbers.
func
utils.release_notes.fetch_prs.save_pr_json(pr_data:dict, output_dir:Path) -> NoneSave PR data to a JSON file.
func
utils.release_notes.generate_release_notes.bump_version(tag:str, bump_type:str='patch') -> strBump a semver tag by major, minor, or patch.
func
utils.release_notes.generate_release_notes.check_opencode_model(model:str) -> NoneVerify that ``model`` is listed by ``opencode models``.
func
utils.release_notes.generate_release_notes.cli()CLI entry point.
func
utils.release_notes.generate_release_notes.main(since_tag:str, bump_type:str='patch', max_iterations:int=3) -> intRun the full release notes generation pipeline.
func
utils.release_notes.generate_release_notes.run_opencode_skill(skill_name:str, version:str, missing_prs:list[int] | None=None, extra_prs:list[int] | None=None) -> boolRun an OpenCode skill non-interactively.
func
utils.release_notes.generate_release_notes.setup_directories() -> NoneCreate output directories.
func
utils.release_notes.generate_slack_message.cli()CLI entry point.
func
utils.release_notes.generate_slack_message.main(version:str, rc_version:str, input_file:Path | None=None, output_file:Path | None=None) -> intGenerate a Slack announcement message.
func
utils.release_notes.generate_slack_message.run_opencode_skill(version:str, input_file:Path, output_file:Path) -> boolRun the hf-release-notes:slack OpenCode skill.
func
utils.release_notes.validate_notes.extract_pr_references(markdown_content:str) -> set[int]Extract all PR numbers referenced in the markdown.
func
utils.release_notes.validate_notes.find_release_notes_file(version:str | None=None) -> Path | NoneFind the release notes file for a version.
func
utils.release_notes.validate_notes.load_manifest() -> list[int]Load PR numbers from manifest.json.
func
utils.release_notes.validate_notes.main()Main entry point.
この情報について
掲載しているシグネチャは huggingface/huggingface_hub の公開ソースコードを
Python の ast モジュールで静的解析し、引数名・デフォルト値・
型注釈・戻り値型をそのまま抽出したものです。実装コードは保存していません。
詳しくは仕組みの解説をご覧ください。