Adding the License field

Adding the license is technically very similar to adding the author field, but knowing what to write is a bit more challenging. You'll have to check what is the real license of the project. Most probably there is a file called "LICENSE" in the root of the project with the full text of the license. Issue #20 call for the collection of that information.

Alternatively you can locate the bug-tracking system of the project (they are usually the same place the version control system can be found) and you can open a ticket or issue depending the word the particular system uses.

Shortening the license field

We can list package with long licenses (over 50 character), but we don't have a way to list the ones that also have a VCS. In general it would be better to use a short and standard name for each license. That will make them more comparable.

The technical details

The JSON file of each package can have a field called license that contains the short name of the license. The most common way to include it in the packages is to add a field called license to the setup function in the of the project or add the same field under [build-system] in pyproject.toml file. Ticket #19 futher discusses the issues.

Here is the section of the file:

        name="name of the project",
        author="Foo Bar",
Here is the section of the pyproject.toml file:
        requires = ["poetry>=0.12"]
        build-backend = "poetry.masonry.api"
        license = "Apache-2.0"

OSI approved licenses

One of the goals is to make it easy to check if a package has an OSI approved license or not. The short names probably should be either the names of URLs of OSI approved licenses or on the short names should be hosted on PYPI web site.
Elapsed time: 0.00026s