Initial commit
This commit is contained in:
22
{{cookiecutter.project_slug}}/examples/basic_usage.py
Normal file
22
{{cookiecutter.project_slug}}/examples/basic_usage.py
Normal file
@@ -0,0 +1,22 @@
|
||||
"""Basic usage example for {{ cookiecutter.project_name }}."""
|
||||
|
||||
from {{ cookiecutter.package_name }} import hello
|
||||
from {{ cookiecutter.package_name }}.core import process_data, {{ cookiecutter.project_name.replace(' ', '').replace('-', '') }}
|
||||
|
||||
|
||||
def main():
|
||||
"""Demonstrate basic usage."""
|
||||
# Basic hello
|
||||
print(hello())
|
||||
|
||||
# Process some data
|
||||
result = process_data("example data")
|
||||
print(result)
|
||||
|
||||
# Use main class
|
||||
instance = {{ cookiecutter.project_name.replace(' ', '').replace('-', '') }}("example")
|
||||
print(instance.run())
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user