setup.py and licensing questions
hi, i'm currently working through all the packaging and licensing stuff for my project and want to put the license in the setup.py file, but there may actually be more than one license (GPL ones for the artwork i've borrowed from another project and whatever license i choose to put on my own code and the artwork i've done). can i put multiple License lines in setup.py classifiers like: ? "License :: OSI Approved :: ???", "License :: OSI Approved :: ???", thanks, songbird -- https://mail.python.org/mailman/listinfo/python-list
Help - Python REST API
Hi, Am trying to create a basic authorization server using client credentials flow and client so that the client can send it credentials using REST methods (POST) to the authorization server. Authrization server then respond with access token. After the access, client can POST, GET, etc to the server for resources. Can anyone help me or give guidelines how I can achieve this using python? Am new in python (average) and need some guidelines or some links. BR Abraham -- https://mail.python.org/mailman/listinfo/python-list
Re: zeroed out
On 2018-12-12 18:59, Dennis Lee Bieber wrote: On Wed, 12 Dec 2018 00:46:03 -0500, "Avi Gross" declaimed the following: All kidding aside, I note that some data that is stored in a fixed width has zeroes padding it all the way to the right. If you store the number 3 in binary as a byte, it tends to look like 0011. Depending on how integers are stored, something similar can happen for longer stretches. But with decimals, we tend to not bother showing the empty areas that represent 0 times ever higher powers of 10. Original COBOL implementation performs arithmetic on BCD (more likely, packed BCD). With two decimal digits per byte (packed BCD), a common 32-digit number requires 16 bytes, or 4 longwords (given the size of processors in 1960). Since arithmetic is basically an array operation in BCD (process least significant digit, process next digit..., etc.) numbers required storage of the filler zeros. Furthermore, of more significance, formatting of a BCD number for output merely required taking each BCD digit (unpacked) or nybble (packed) and ADDING the value of (ASCII) "0". Conversely, input of (ASCII) fixed width/filled numbers simply requires subtracting "0" from each digit to get the BCD value for it (followed by packing the right-side nybbles to get packed BCD) The Intel 8080 includes a DAA (decimal adjust accumulator) instruction to "correct" an 8-bit value back to packed BCD. Adding two 2-digit BCD values using normal binary ADD/ADC would result in an incorrect binary value (the source wasn't binary, but the result isn't BCD), DAA would adjust that back to BCD, using a "half carry" flag to handle the internal digit split. Later processors have a DAS instruction, which is used after BCD subtraction. The humble 6502 doesn't have DAA/DAS, but instead has a decimal mode flag. There's a clever way to perform BCD addition on long BCD numbers (32-bit, 64-bit, whatever) without having to do it 1 digit (or 1 byte) at a time. -- https://mail.python.org/mailman/listinfo/python-list
Re: setup.py and licensing questions
songbird writes: > can i put multiple License lines in setup.py > classifiers like: ? > > "License :: OSI Approved :: ???", > "License :: OSI Approved :: ???", Yes. The semantics of that are not formalised, to my knowledge. You would be signaling that the specified licenses are involved somehow, but not how they combine for this specific work. For this reason (and others) you should always put an explicit, unambiguous *grant of license* in the work, preferably in the README document or somewhere prominent like that. The grant of license is a statement, preferably brief, that says exactly what the work is, who holds copyright, who receives a grant of license, and what that grants the recipient to do, under what explicit conditions. For example: Copyright © 2018 Ben Finney Purple Drachma is free software: you are free to copy, modify, and/or distribute this work under the conditions of the GNU Affero General Public License, version 3 or later as published by the Free Software Foundation. See the file LICENSE.AGPL-3.0 for details. -- \ “You don't need a book of any description to help you have some | `\kind of moral awareness.” —Dr. Francesca Stavrakoloulou, bible | _o__) scholar, 2011-05-08 | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list
Re: Help - Python REST API
Afriyie Abraham Kwabena writes: > Am trying to create a basic authorization server using client > credentials flow and client so that the client can send it credentials > using REST methods (POST) to the authorization server. At minimum, this implies that you are implementing a web server (either from scratch, or by plugging your code into some existing web server) to listen for and respond to the HTTP requests. Have you already chosen which web server will be receiving requests? > Can anyone help me or give guidelines how I can achieve this using > python? There are existing frameworks (Flask, Django) that make it relatively straightforward to implement a REST API — that is, relative to writing it from scratch! Even using such a framework, you would still be accepting the burden of implementing and deploying a full web service. -- \ “Computers are useless. They can only give you answers.” —Pablo | `\ Picasso | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list
When to Use Django & Flask frame work
Hi Viewers, I am new to java I want to about when to Use Django & Flask.. I have started working on it.Anybody can you suggest the difference...will be Appreciated. -- https://mail.python.org/mailman/listinfo/python-list
Re: setup.py and licensing questions
Ben Finney wrote: > songbird writes: > >> can i put multiple License lines in setup.py >> classifiers like: ? >> >> "License :: OSI Approved :: ???", >> "License :: OSI Approved :: ???", > > Yes. > > The semantics of that are not formalised, to my knowledge. You would be > signaling that the specified licenses are involved somehow, but not how > they combine for this specific work. ok, thanks, that's good to know. i will have a list of each file i've used from elsewhere, where it came from and as best as i can figure it out the licenses/copyright holders and/or permissions. i'm not using anyone else's code but i am using some artwork and a man page that i've adapted. > For this reason (and others) you should always put an explicit, > unambiguous *grant of license* in the work, preferably in the README > document or somewhere prominent like that. > > The grant of license is a statement, preferably brief, that says exactly > what the work is, who holds copyright, who receives a grant of license, > and what that grants the recipient to do, under what explicit conditions. > > For example: > > Copyright © 2018 Ben Finney > Purple Drachma is free software: you are free to copy, modify, > and/or distribute this work under the conditions of the GNU Affero > General Public License, version 3 or later as published by the Free > Software Foundation. See the file LICENSE.AGPL-3.0 for details. yes, i'll be putting a license on the code and any of the artwork i've made. thank you, songbird -- https://mail.python.org/mailman/listinfo/python-list
Re: When to Use Django & Flask frame work
VENKEY ROKZS writes: > Hi Viewers, Welcome to the Python discussion forum. > I am new to java I want to about when to Use Django & Flask.. Typically we use those frameworks more with Python, not Java :-) > I have started working on it.Anybody can you suggest the difference... The biggest difference I would point out: Flask is small, Django is big. More accurately: Both are full web development frameworks, but Flask is focussed more to allow you to assemble many of the pieces yourself, which Django makes many of the decisions for you by default. Even more accurately: Both Flask and Django are reasonably small and fast, and both allow you to customise the pieces quite well. The difference I alluded to is rather one of emphasis: Flask expects that you will want to quite soon replace many of the standard pieces, while Django expects that you can go the whole application lifecycle without needing to change any of the default pieces. I hope that helps! If you have the time, feel free to evaluate each of them and choose whichever one suits your need. If you don't have time, I would recommend starting with Django because you will be able to get a long way without needing to diverge from the default. -- \ “If I ever get real rich, I hope I'm not real mean to poor | `\ people, like I am now.” —Jack Handey | _o__) | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list
Re: zeroed out
MRAB wrote: Later processors have a DAS instruction, which is used after BCD subtraction. The humble 6502 doesn't have DAA/DAS, but instead has a decimal mode flag. The 68000 also had a Decimal Add instruction, but disappointingly it only worked a byte at a time. I guess running COBOL at high speed wasn't a priority by then. But for sheer unadulterated decimalness, you can't beat the custom CPU that HP used in their handheld calculators in the 70s and 80s. Early versions of it did *only* decimal arithmetic (on 14-digit registers and memory locations). An option for binary wasn't added until the HP-41. -- Greg -- https://mail.python.org/mailman/listinfo/python-list
