Packaging Structure Book

0 views
Skip to first unread message

Gibert Chisholm

unread,
Aug 5, 2024, 4:23:55 AM8/5/24
to locolsowins
Thistutorial walks you through how to package a simple Python project. It willshow you how to add the necessary files and structure to create the package, howto build the package, and how to upload it to the Python Package Index (PyPI).

Creating the file __init__.py is recommended because the existence of an__init__.py file allows users to import the directory as a regular package,even if (as is the case in this tutorial) __init__.py is empty.[1]


Tools like pip and build do not actually convert your sourcesinto a distribution package (like a wheel);that job is performed by a build backend. The build backend determines howyour project will specify its configuration, including metadata (informationabout the project, for example, the name and tags that are displayed on PyPI)and input files. Build backends have different levels of functionality, such aswhether they support building extension modules, andyou should choose one that suits your needs and preferences.


Some build backends are part of larger tools that provide a command-lineinterface with additional features like project initialization and versionmanagement, as well as building, uploading, and installing packages. Thistutorial uses single-purpose tools that work independently.


Additional configuration of the build tool will either be in a tool sectionof the pyproject.toml, or in a special file defined by the build tool. Forexample, when using setuptools as your build backend, additional configurationmay be added to a setup.py or setup.cfg file, and specifyingsetuptools.build_meta in your build allows the tools to locate and use theseautomatically.


readme is a path to a file containing a detailed description of thepackage. This is shown on the package detail page on PyPI.In this case, the description is loaded from README.md (which is acommon pattern). There also is a more advanced table form described in thepyproject.toml guide.


classifiers gives the index and pip some additional metadataabout your package. In this case, the package is only compatible with Python3, is licensed under the MIT license, and is OS-independent. You shouldalways include at least which version(s) of Python your package works on,which license your package is available under, and which operating systemsyour package will work on. For a complete list of classifiers, see


See the pyproject.toml guide for detailson these and other fields that can be defined in the [project]table. Other common fields are keywords to improve discoverabilityand the dependencies that are required to install your package.


The tar.gz file is a source distributionwhereas the .whl file is a built distribution.Newer pip versions preferentially install built distributions, but willfall back to source distributions if needed. You should always upload a sourcedistribution and provide built distributions for the platforms your project iscompatible with. In this case, our example package is compatible with Python onany platform so only one built distribution is needed.


Technically, you can also create Python packages without an __init__.py file,but those are called namespace packagesand considered an advanced topic (not covered in this tutorial).If you are only getting started with Python packaging, it is recommended tostick with regular packages and __init__.py (even if the file is empty).


Lately, I've been doing some freelance work on the side for some of my UE4 marketplace customers who required custom modifications for the blueprint templates. And one of these projects has a heavy focus on data-driven design through the use of Structures, Data Tables, Data Assets, etc. Without going into specifics, the advantage of doing so is essentially to enable the customer to make changes to the project mostly through data without tinkering with blueprint logic.


While working on this project, I recently had to make some changes to a Structure which was being used across a lot of blueprints. After doing some testing, everything seemed to be working fine, with no compiler errors or gameplay crashes. So I decided to wrap it up and package the project, but then the packaging process failed and threw a whole bunch of "Unknown structure" errors. And it had to do with the edited structure.


Granted the errors show the blueprints that contain this structure, but disconnecting & reconnecting every single one of those "Break Struct" nodes would have been quite time consuming. However, thankfully I stumbled upon an option under the blueprints menu that made this process a whole lot smoother.


Fixing the errors still does require going to each of the listed blueprints, but instead of going to each struct related node, you can essentially go to the File option in the top menu, and select Refresh All nodes.


Compile & save, and then do the same for all of the required blueprints. And that's it. If you try packaging the project again, there should be no "Unknown structure" errors putting a halt to the process anymore.


This simple solution helped me save a decent chunk of time that would have been otherwise spent doing the same repetitive task across several blueprints. So I figured I'll share this information here. Maybe, it'll save you some time in the future.




The site is secure.

The ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.


Natural edible films have recently gained a lot of interests in future food packaging. Polysaccharides and proteins in edible materials are not toxic and widely available, which have been confirmed as sustainable and green materials used for packaging films due to their good film-forming abilities. However, polysaccharides and proteins are hydrophilic in nature, they exhibit some undesirable material properties. Cold plasma (CP), as an innovative and highly efficient technology, has been introduced to improve the performance of polysaccharides and proteins-based films. This review mainly presents the basic information of polysaccharides and proteins-based films, principles of CP modified biopolymer films, and the effects of CP on the structural changes including surface morphology, surface composition, and bulk modification, and properties including wettability, mechanical properties, barrier properties, and thermal properties of polysaccharides, proteins, and polysaccharide/protein composite-based films. It is concluded that the CP modified performances are mainly depending on the polysaccharides and proteins raw materials, CP generation types and treatment conditions. The existing difficulties and future trends are also discussed. Despite natural materials currently not fully substitute for traditional plastic materials, CP has exhibited an effective solution to shape the future of natural materials for food packaging.


These are the recommended structures from the spec consolidation program. Any selection should be confirmed with your PDE before pricing. If there are no specific custom requirements or value-added options, these specs should be always used to optimize operations and consider EGC printing.


Select Country*Afghānestānal-JazāʾirAndorraAngolaAnguillaAntigua & BarbudaArgentinaArmeniaAustraliaAzerbaycanBahrainBanglādeśBarbadosBelarusBelgiumBelizeBninBermudaBoliviaBosna i HercegovinaBotswanaBrasilBritish Virgin IslandsBruneiBulgariaBurkina FasoBurundiCamerounCanadaCabo VerdeCayman IslandsČesk republikaChileChinaChosŏnCitt del VaticanoColombiaCongoCosta RicaCte d'IvoireCubaDanmarkDeutschlandDhivehi RajjgeDominicaDruk-YulEcuadorEestiEgyptEl SalvadorEspaaFijiFilasṭīnFranceGabonGambiaGhanaGreeceGrenadaGuatemalaGuinea-BissauGuineGuine EquatorialeGuyanaHaitiHan KukHondurasHong KongHrvatskaIndiaIndonesiaĪrānal-ʿIrāqIrelandIrītriyāslandIsraelĪtyop'iyaItaliaJamaicaJapanJībūtīJordanJuzur al-QamarKampuchaKenyaKiribatiKoreaKosovaKuwaitKyprosKyrgyzstanLaoLatvijaLesothoLiberiaLībiyyāLiechtensteinLietuvaLubnānLuxembourgMacedoniaMadagascarMagyarorszgMalawiMalaysiaMaliMaltaMarocMarshall IslandsMauriceMxicoMicronesiaMoldovaMongol UlsMontenegroMontserratMozambiqueMūrītāniyyāMyanmaNamibiaNauruNederlandNepālNew ZealandNicaraguaNigerNigeriaNorgeOmansterreichO'zbekistonPakistanPalauPanamPapua New GuineaParaguayPerPhilippinesPolskaPortugalPuerto RicoQatarQazaqstanRepblica DominicanaRpublique CentrafricaineRomniaRussiaRwandaSak'art'veloSamoaSan MarinoSo Tom e PrncipeSaudi ArabiaSchweizSngalSeychellesShqipriaSierra LeoneSingaporeSloveniaSlovenskoSolomon IslandsSouth AfricaSouth SudanSrbijaSrī LankāSt. Kitts & NevisSt. LuciaSt. Vincent & The GrenadinesSuisseAṣ-ṢūmālSuomias-SūdānSurinameSūrīyāSverigeSwazilandTaiwanTanzaniaThailandThe BahamasTimor-LesteTogoTojikistanTongaTrinidad & TobagoTšādTrkmenistanTunisieTrkiyeTurks & CaicosTuvaluUgandaUkrajinaUnited KingdomUnited Arab EmiratesUnited StatesUruguayVanuatuVenezuelaVietnamal-YamanZambiaZimbabwe

Please leave this field empty.


Having a distinctive packaging structure can offer a variety of benefits over standardized packaging structures. When done right, the benefits of going to market with non-standard packaging structure can outweigh the downside of its incremental costs.


Structural design is the hub of packaging: salesmen bring clients in, clients describe their needs and then the structural design process comes into play. All pre preparation before production is part of the structural design process and it takes a dedicated and knowledgeable team to walk clients though it, making recommendations and improvements throughout.


It may not seem like it, but the box your product comes in is just as important to the consumer as the product- your package should be unique. Take Tiffany and Co. for example, when you see the Tiffany blue box your mind instantly thinks of their luxury brand. Consumers save these boxes because it represents more than the product itself, it represents a keepsake and reminds customers of their experience first receiving the product. Having a memorable part of your packaging can increase the value of your brand.

3a8082e126
Reply all
Reply to author
Forward
0 new messages