Package: testuL
uLBrainuLBrain is a library that is used specifically for mapping 2 DatasetsHow to build this library locally?Create the following file structure locally:.PYPIRCpackage/â”œâ”€â”€â”€uLBrainâ”œâ”€â”€â”€__init__.pyâ””â”€â”€â”€mapSKU.pyinit.py is required to import the directory as a package, and should be empty.mapSKU.py is a module within the package that could contain the logic
(functions, classes, constants, etc.) of your package..PYPIRC file contains the username astokenand password as the access token generated from PYPI portal(username -> Account Settings -> API Token -> Add API token)[distutils]index-servers=pypi[pypi]username=__token__password=##copy paste token from PYPI portalCreating the package files:You will now add files that are used to prepare the project for distribution. When youâ€™re done, the project structure will look like this:.PYPIRCpackage/â”œâ”€â”€â”€uLBrainâ”‚â”œâ”€â”€â”€__init__.pyâ”‚â””â”€â”€â”€mapSKU.pyâ”œâ”€â”€â”€LICENSEâ”œâ”€â”€â”€README.mdâ””â”€â”€â”€setup.pyCreating setup.pysetup.py tells frontend build tools like pip and build what backend tool to use to create distribution packages for your projectOpen setup.py  and enter the following content.importsetuptoolsfrompathlibimportPaththis_directory=Path(__file__).parentlong_description=(this_directory/"README.md").read_text()setuptools.setup(name="uLBrain",version="0.0.1",author="example",author_email="author@abc.com",description="Library created to map two Dataset",long_description=long_description,long_description_content_type='text/markdown',readme="README.md",packages=setuptools.find_packages(),classifiers=["Programming Language :: Python :: 3","License :: OSI Approved :: MIT License","Operating System :: OS Independent",],python_requires='>=3.7',install_requires=['pyspark','spark'])name is the distribution name of your package.version is the package version.authors is used to identify the author of the package; you specify a name and an email for each author. You can also list maintainers in the same format.description is a short, one-sentence summary of the package.readme is a path to a file containing a detailed description of the package. This is shown on the package detail page on PyPI. In this case, the description is loaded from README.md (which is a common pattern). There also is a more advanced table form described in the project metadata specification.requires-python gives the versions of Python supported by your project. Installers like pip will look back through older versions of packages until it finds one that has a matching Python version.classifiers gives the index and pip some additional metadata about your package. In this case, the package is only compatible with Python 3, is licensed under the MIT license, and is OS-independent. You should always include at least which version(s) of Python your package works on, which license your package is available under, and which operating systems your package will work on. For a complete list of classifiers, seehttps://pypi.org/classifiers/.Creating README.mdÂ¶Open README.md and enter the following content. You can customize this if youâ€™d like.# Example Package

This is a simple example package. You can use
[Github-flavored Markdown](https://guides.github.com/features/mastering-markdown/)
to write your content.Creating LicenseItâ€™s important for every package uploaded to the Python Package Index to include a license. This tells users who install your package the terms under which they can use your package. Once you have chosen a license, open LICENSE and enter the license text. For example, if you had chosen the MIT license:Copyright (c) 2018 The Python Packaging Authority

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.Generating distribution archivesWrite the below command in the terminal to build the wheel filepythonsetup.pybdist_wheelAfter doing the above step the directory structure would look like as followsâ”œâ”€â”€â”€buildâ”‚â”œâ”€â”€â”€bdist.win-amd64â”‚â””â”€â”€â”€libâ”‚â””â”€â”€â”€uLBrainâ”œâ”€â”€â”€distâ”‚â””â”€â”€â”€uLBrain-0.0.1-py3-none-any.whlâ”œâ”€â”€â”€uLBrain|â”œâ”€â”€â”€__init__.pyâ”‚â””â”€â”€â”€mapSKU.pyâ”œâ”€â”€â”€uLBrain.egg-infoâ”œâ”€â”€â”€LICENSEâ”œâ”€â”€â”€README.mdâ””â”€â”€â”€setup.pyWrite the below command to upload the wheel file to the PYPI portaltwineuploaddist/*InstallationUse the package managerpipto install uLBrain.pipinstalluLBrainUsageWrite the below commands to install & import the library into Databrick Notebook# installing the librarypipinstalluLBrain# Import the library and modulefromuLBrainimportmapSKUdf=mapSKU.getMaterialMappedAtSKULevel("HierarchySiriusLocalProduct")display(df)