{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Add new module" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let say you develop a module named, `detect_harimau`, so you want to import your module easily from `malaysia_ai_projects`,\n", "\n", "```python\n", "from malaysia_ai_projects import detect_harimau\n", "```" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Library structure\n", "\n", "```text\n", "- malaysia_ai_projects\n", " - __init__.py\n", " - suarakami\n", " - __init__.py\n", " - detect_harimau\n", " - __init__.py\n", "```\n", "\n", "We do not import your module directory to prevent any import error, so to load your module, we have to use `from import`." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## A good example\n", "\n", "You can check https://github.com/malaysia-ai/projects/tree/master/malaysia_ai_projects/suarakami" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.7" } }, "nbformat": 4, "nbformat_minor": 4 }