License protection of a python project

Hello, I need your help.
I have a python project, but I would protect it with a license.
I’m lost with that.

Do you want an open-source license? Try choosealicense.com

1 Like

Yes I want an open-source no-commercial license, do you know any?

Did you click on the link?

Yes, but I don’t see non-commercial license

In what way does a license “protect”? Isn’t it rather the opposite? Without a license, people aren’t allowed to “use” your stuff, and with a license, you allow some usage. That’s what licenses do, no?

I say ‘protect’ to prevent content theft

If you mean “the license depends on who the user is”, you may want to look into Multi-licensing - Wikipedia. For instance, sometimes code is released under one license for educational use and another license for companies.

But really, I just wouldn’t worry about this. I’m more interested in sharing useful code than controlling it. And I don’t personally have the resources to sue someone for infringement if it came down to that.

How does a license prevent content theft? A license is literally a permission to do things.

By default, anything you upload belongs to you and noone can use it. You only need a license if you want to allow others to use it.

It is already protected by copyright law. No one can use your code without a license.

Edit:
This is not legal advice; it is just common knowledge. You have to consult an attorney to get legal advice about the matter.

You can find a listing of OSI approved open source licenses, popular in various communities, at
https://opensource.org/licenses/?categories=popular-strong-community.
Perhaps the two most popular ones are the MIT and Apache 2 license - you cannot really go very wrong with those, I think.

Many licenses have restrictions for users of the software in regards to patents, so they can protect for instance in that regard. Apart from that a license can also protect an author against liability issues.

If instead you want a maximally permissive open source license (it doesn’t seem you do), then you could consider the Blue Oak Model license – see a nice post here: https://writing.kemitchell.com/2022/08/05/Public-Domain-Software. (It’s definitely better, imo, than the WTFPL and the Unlicense - but you wouldn’t want either of those either given that you’re asking about protections for yourself rather than protections for any users.)

The following source may also be useful: Open Source Licensing Software Freedom and Intellectual Property Law by Lawrence Rosen Maybe a bit dated, but gives a pretty extensive overview, and is very readable for non-lawyers.

A popular licence is the GPL:

https://www.gnu.org/licenses/gpl-3.0.en.html

Open source and ‘no commercial usage’ can’t really go together. By virtue of being open source, it can be used or at least looked at by commercial entities.

You’d have to go non-open-source to effectively limit commercial usage.

Closest is using GPL. That would force anyone releasing code with your library/executable to release the source code for it under the same GPL license.

Imagine for a second that there was a license that disallowed commercial usage, but was open-source. It would be a new thing, and have to be defended in court: which sounds expensive. Actually even GPL defense can be expensive. Big companies legally should handle licensing appropriately, but proving misuse, etc. is once again: a court battle.

Happy to say that where I work, any open-source library usage gets a mandatory license check first to make sure its compatible with our stuff.

(This is not legal advice. Seek a lawyer for legal advice.)

Hmm, is that really true? I mean, in non-code contexts, you can license something CC-BY-NC and everything works fine. It won’t truly be “free software” and it won’t be compatible with the GPL, but it’d still be a form of open source. Not as free as other licenses, but freer than “all rights reserved”. IANAL though.

Be careful, that’s an oversimplification. The GPL does not preclude commercial usage or any other usage, and doesn’t even preclude private changes. All it really demands is that, if you give someone a binary, you have to let them have the source too. There is nothing whatsoever preventing me from taking GPL’d source code, making changes, and using it myself (and in fact, I do that all the time); there’s also nothing in the regular GPL to stop me running that on a server and charging people money to access it, although the AGPL tries to plug that loophole.

Nor is this. Definitely seek a lawyer, more specifically, one well versed in copyright law in your jurisdiction, if you need actual advice.

1 Like

Can I license my project with an open-source license but disallow commercial use?

(But note the comments under the question.)

2 Likes

Hmm, is that really true? I mean, in non-code contexts, you can
license something CC-BY-NC and everything works fine. It won’t
truly be “free software” and it won’t be compatible with the GPL,
but it’d still be a form of open source. Not as free as other
licenses, but freer than “all rights reserved”. IANAL though.

It depends on how you define the term “open source.” Most people in
the field look to the Open Source Initiative’s (OSI) Open Source
Definition (OSD)[*], a descendent of the Debian Free Software
Guidelines (DFSG). In this case, §6. No Discrimination Against
Fields of Endeavor is most relevant:

“The license must not restrict anyone from making use of the program
in a specific field of endeavor. For example, it may not restrict
the program from being used in a business, or from being used for
genetic research.”

This is why you won’t (ever) find non-commercial options in the list
of OSI-approved licenses.

[*] https://opensource.org/osd/

Thanks for the https://opensource.org/osd/ link. Case 6 is a pretty good one, I think. But…imo it’s also a bit vague/overly general - and has to be seen in the context of all the other points. Certain forms of “use” are definitely not permitted by many licenses. (For instance use + not providing a copy of the license. This has been litigated in court and was seen as copyright infringement in one case. See: Open source license litigation - Wikipedia).

Some current OSI licenses do effectively preclude commercial use - or come very near. At my last company we were even forbidden to use certain open source code for strictly internal/personal use because of their licenses (one of the GPL licenses was considered off limits for instance).

Also, there is no reason to select one of the OSI-approved licenses. You could use CC BY-NC 4.0 also for software or write your own license based on that. That would explicitly forbid commercial use.

But, since this is a doggy dog world, if you want to prevent actual commercial use in all possible futures, then the only way is to not publish the code :person_shrugging:

Some current OSI licenses do effectively preclude commercial use -
or come very near. At my last company we were even forbidden to
use certain open source code for strictly internal/personal use
because of their licenses (one of the GPL licenses was considered
off limits for instance).

A company deciding not to use software because it has a particular
license with terms they don’t wish to follow isn’t the same thing as
the licensor forbidding the company from using it. That’s like
saying a restaurant refused to serve you because you didn’t want
what they had on their menu.

The usual example is the AGPLv3, whose “Affero” clause (inherited
from the original Affero License) requires anyone who provides
remote access to a running instance of the software so licensed to
display the license and offer a copy of the source code to all
users, including the source for any modifications they’ve made to
said software. Many businesses don’t want to abide by those
license terms, so choose to avoid such software, but the license
doesn’t forbid them from using the software. More importantly, it
doesn’t discriminate against their field of endeavor (OSD §6), since
it applies equally to anyone who wishes to use the software in the
same way, e.g. both commercial and non-commercial use alike are
bound by this clause.

Also, there is no reason to select one of the OSI-approved
licenses. You could use CC BY-NC 4.0 also for software or write
your own license based on that.

Well, the OP seemed to be expressing an interest in using an open
source license which forbids commercial use. My point was, by the
most widely accepted definition of the term “open source license”
(those approved by OSI or which meet the requirements of the OSD),
there is no such thing.

There are some “source available” licenses that have started to gain
traction recently which are not “open source” according to OSI,
mainly because they would violate §6 of the OSD: the Business Source
License used by HashiCorp for their Terraform and Vault products,
the Server Side Public License used by MongoDB, the Elastic License
used for ElasticSearch… CC-BY-NC would fall into a similar
category except it’s not intended to be applied to software
according to its authors[*].

[*] Frequently Asked Questions - Creative Commons

1 Like

Yes, valid point.

Well, the OP seemed to be expressing an interest in using an open
source license which forbids commercial use.

Also true - Except it’s a bit unclear what the OP actually wants to allow and forbid or why (any kind of commercial use, or something else?). They really should have attached a license to make this clear :slight_smile:

2 Likes