diff --git a/README.md b/README.md index 4b80057..eb2d01a 100644 --- a/README.md +++ b/README.md @@ -183,14 +183,6 @@ Run your project: ohmyapi serve ``` -## Shell - -Similar to Django, you can attach to an interactive shell with your project already loaded inside. - -``` -ohmyapi shell -``` - ## Authentication A builtin auth app is available. @@ -281,3 +273,40 @@ class Team(Model): class Meta: manager = TeamManager() ``` + +## Shell + +Similar to Django, you can attach to an interactive shell with your project already loaded inside. + +``` +ohmyapi shell + +Python 3.13.7 (main, Aug 15 2025, 12:34:02) [GCC 15.2.1 20250813] +Type 'copyright', 'credits' or 'license' for more information +IPython 9.5.0 -- An enhanced Interactive Python. Type '?' for help. + +OhMyAPI Shell | Project: {{ project_name }} [{{ project_path }}] +Find your loaded project singleton via identifier: `p` +``` + +```python +In [1]: p +Out[1]: + +In [2]: p.apps +Out[2]: +{'ohmyapi_auth': App: ohmyapi_auth + Models: + - Group + - User + Routes: + - APIRoute(path='/auth/login', name='login', methods=['POST']) + - APIRoute(path='/auth/refresh', name='refresh_token', methods=['POST']) + - APIRoute(path='/auth/me', name='me', methods=['GET']) + - APIRoute(path='/auth/introspect', name='introspect', methods=['GET'])} + +In [3]: from tournament.models import Tournament +Out[3]: + +``` +