Skip to content

Commit

Permalink
Add proper __version__
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelzw committed Aug 13, 2023
1 parent a28f406 commit cdf4f75
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion fastapi_restful/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
import importlib.metadata
import warnings

from .cbv_base import Api, Resource, set_responses, take_init_parameters

__version__ = "0.4.3"
try:
__version__ = importlib.metadata.version(__name__)
except importlib.metadata.PackageNotFoundError as e:
warnings.warn(f"Could not determine version of {__name__}", stacklevel=1)
warnings.warn(str(e), stacklevel=1)
__version__ = "unknown"


__all__ = [
"Api",
Expand Down

0 comments on commit cdf4f75

Please sign in to comment.