As mentioned in a previous question about the Apache 2.0 code header, I mentioned having the code header which is recommended by the Appendix of the Apache 2.0 license.However there are two fields that information can be placed in regarding copyrights/licenses for a standardized Python boilerplate header for a module.  The two fields are __copyright__ and __license__ as specified by this relevant answer on StackOverflow.I'm wondering about what information should go where, should I include only my name and copyright year in the __copyright__ field and then have the __license__ field be the full text of the Apache 2.0 license? Should the __license__ field duplicate the copyright line with my name and the year?ORAlternatively could have the full text of the license in the __copyright__ field and then simply list the license name in the __license__ field as Apache 2.0 as the __license__ field is more commonly used.I'm mostly worried about preserving the Apache 2.0 header's use without having to split it up but I'm also worried about duplicate information in a header. (Containing copyright year and my name in both __license__ and __copyright__ fields.)Currently I was thinking the following:__copyright__ =     Copyright 2016 <MY FULL NAME>    Licensed under the Apache License, Version 2.0 (the License);    you may not use this file except in compliance with the License.    You may obtain a copy of the License at       http://www.apache.org/licenses/LICENSE-2.0    Unless required by applicable law or agreed to in writing, software    distributed under the License is distributed on an AS IS BASIS,    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.    See the License for the specific language governing permissions and    limitations under the License.__license__ = Apache 2.0
Placement of copyright and license variables within Python source?
apache 2.0;license file
Some licenses, like Apache 2.0 as you noted, recommends including a copy of the license, or some shortened version, in each file. It's best if you can follow these recommendations, but as long as it's clear what file falls under what license, you don't need to follow any convention. The reason why some licenses recommend this is often because they operate on a per-file basis, as opposed to per-project licenses like GPL. Note that a lot of these conventions were established before widespread use of version control software, so people had to manually track authorship. See this question for more details: Should I include license text in a single file or all source files?But this is tangential to the __copyright__ and __license__ variables. They are part of certain Python coding styles, which are supported by certain Python tools like epydoc. What you put in these variables depends on your project's coding style, and whether you use tools like epydoc. If none of these apply, it's up to your personal preference.