Hello Module
The hello module provides a simple demonstration function for the Marvelpy package.
Functions
hello_world
Return a hello world message.
This is a simple demonstration function that returns a greeting message. It serves as a placeholder for the initial package release.
Returns:
| Type | Description |
|---|---|
str
|
A greeting message string. |
Example
hello_world() 'Hello from Marvelpy!'
Source code in src/marvelpy/hello.py
Examples
Basic Usage
from marvelpy.hello import hello_world
# Get the hello message
message = hello_world()
print(message)
# Output: "Hello from Marvelpy!"
Type Checking
from marvelpy.hello import hello_world
# The function returns a string
result = hello_world()
assert isinstance(result, str)
assert len(result) > 0
Integration Example
import marvelpy
# Using the function from the main package
def greet_user():
return marvelpy.hello_world()
# Use in your application
greeting = greet_user()
print(f"Welcome! {greeting}")
Notes
This is a demonstration function included in the initial release of Marvelpy. It serves as a placeholder while the full Marvel Comics API client is being developed.