func_args
A lightweight Python library for creating wrapper functions with enhanced argument handling using sentinel values to mark parameters as required or optional.
Decision gist · record as of 2026-08-14
Yes. The package solves a genuine problem in API wrapper design with zero dependencies, active maintenance, and a permissive license. It is well-suited for anyone building wrapper functions around third-party APIs or defining dataclasses with flexible required/optional field ordering. No known vulnerabilities and straightforward installation make it a low-risk addition.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Zero runtime dependencies and a pure Python wheel make installation straightforward.
- The package is actively maintained with recent releases and supports modern Python versions from 3.10 through 3.14.
License · maintenance · safety
MIT (permissive) — MIT license is permissive and places no restrictions on use, modification, or distribution in commercial or private projects.
last release 2026-04-28 (108 days) · last repo commit 2026-04-28 · 1 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 851,788 downloads/mo, #4,901 on PyPI
Alternatives
Verify before relying
from func_args.api import REQ, OPT, prepare_kwargs
def wrapper(required_arg=REQ, optional_arg=OPT):
kwargs = dict(required_arg=required_arg, optional_arg=optional_arg)
return prepare_kwargs(**kwargs)
wrapper(required_arg="value")- Whether the dataclass mixins work correctly with all standard dataclass decorators and field configurations.
- Performance characteristics when used with large numbers of parameters or high-frequency call patterns.
What it is and what it does
func_args is a lightweight, zero-dependency Python library that solves a common problem when wrapping third-party APIs: cleanly separating required parameters from optional ones and automatically validating or filtering them. It provides two sentinel values—REQ to mark required parameters and OPT to mark optional ones—along with utility functions like prepare_kwargs() that validate required arguments and remove optional ones in a single pass.
Beyond simple wrapper functions, the package includes dataclass mixins (BaseModel and BaseFrozenModel) that let you define dataclasses with REQ and OPT defaults in any order, bypassing Python's standard restriction that fields without defaults must come before fields with defaults. This is useful for building configuration objects or data structures where the order of definition matters more than the order of required versus optional fields.
Use it for
- Creating a cleaner wrapper around a third-party API where you want to enforce required parameters and exclude optional ones.
- Building configuration dataclasses where optional fields need to appear before required ones in the class definition.
- Validating function arguments in a wrapper that passes them through to an underlying API, raising an error early if required.
- Constructing kwargs dictionaries that filter out sentinel values before passing them to external functions.
- Defining frozen configuration objects with computed fields that require some parameters but not others.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package solves a genuine problem in API wrapper design with zero dependencies, active maintenance, and a permissive license. It is well-suited for anyone building wrapper functions around third-party APIs or defining dataclasses with flexible required/optional field ordering. No known vulnerabilities and straightforward installation make it a low-risk addition.
Install
func-args on PyPI
Before you install
Zero runtime dependencies and a pure Python wheel make installation straightforward. The package is actively maintained with recent releases and supports modern Python versions from 3.10 through 3.14.
Requires Python 3.10 or later.
License in practice
MIT license is permissive and places no restrictions on use, modification, or distribution in commercial or private projects.
Quickstart
from func_args.api import REQ, OPT, prepare_kwargs
def wrapper(required_arg=REQ, optional_arg=OPT):
kwargs = dict(required_arg=required_arg, optional_arg=optional_arg)
return prepare_kwargs(**kwargs)
wrapper(required_arg="value")
Verify before relying
- Whether the dataclass mixins work correctly with all standard dataclass decorators and field configurations.
- Performance characteristics when used with large numbers of parameters or high-frequency call patterns.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release <4.0,>=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 108 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 851,788 / month, #4,901 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersNatural Language :: EnglishOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: UnixProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14 |
Evidence: func_args-1.0.2-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “wrapper function argument handling”
- func_argsProvides sentinel values (REQ and OPT) and utility functions to…
- arghArgh turns plain Python functions into command-line interfaces by…
- pydantic-function-modelsWraps Python functions to validate their arguments against type hints…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also nulltype · niltype · strongtyping · django-braces · sentinels · Redis-Sentinel-Url · sentinel · argparse-dataclass · mo-kwargs · responses