Re: Checking whether type is None
Steven D'Aprano : > On Wed, 25 Jul 2018 16:14:18 +, Schachner, Joseph wrote: >> thing is None looks just as odd to me. Why not thing == None ? That >> works. > > It is wrong (in other words, it doesn't work) because it allows > non-None objects to masquerade as None and pretend to be what they are > not. > > If that's your intent, then of course you may do so. But without a > comment explaining your intent, don't be surprised if more experienced > Python programmers correct your "mistake". Also, while thing == None would work perfectly in almost all cases in practice, it's unidiomatic and suggests the writer isn't quite comfortable with the workings of the language. Somewhat similarly, this code works perfectly: while (x > 0): y = y * x x = x - 1 # end of while return(y) but it doesn't look like Python. Marko -- https://mail.python.org/mailman/listinfo/python-list
Python back-end architecture for android application
Hello all, I am new to python language. I am planning to create android application, whose back end will be Python. The work of the android application is to visualize the co2 emission information and production quantity of the each resource plants. I have confusion regarding the back end architecture which will provide co2 and production quantity information for every 15 minutes. Here is the architecture what i am thinking, give me your feedback if anything wrong. First i am deploying the python application (Written in Django framework) in the server, in application i will provide the required parameters to fetch the data from the ENTSOE API, which provide response in XML that i will parse for the required data. The request has to sent by the application for every 15 minutes.Then application store the parsed data in the relational database. I am creating the web service(Django rest framework) to make connection between android application and data base. Once android application sent the request to the web service running in different server sends the request to the database to fetch required data. Web service sends the JSON response to the android app which will display the result. https://ibb.co/fdYboo here you find my architecture to better understandings. Thanks in advance -- https://mail.python.org/mailman/listinfo/python-list
Re: Checking whether type is None
Op 2018-07-25, Ian Kelly schreef : > Is there a reason for using singledispatch here rather than a simpler and > more readable "if color is None" check? Yes, the other 20 cases I didn't show. And extensibility. Stephan -- https://mail.python.org/mailman/listinfo/python-list
Anyone using cloud based monitoring/logging services with Python logging module?
Looking for feedback on anyone who's using a cloud based monitoring/logging service with Python's standard lib logging module, eg. services such as Datadog, Loggly, Papertrailapp, Scalyr, LogDNA, Logz.io, Logentries, Loggr, Logstats? Would appreciate hearing your experience, pros, cons, recommendations, etc. Thanks! Malcolm -- https://mail.python.org/mailman/listinfo/python-list
Re: Anyone using cloud based monitoring/logging services with Python logging module?
I used DataDog. At the time, I didn't have any experience with python. I had to depend the company to make patches to things that didn't work. And anything custom, I just did a cron job instead of trying to integrate with their tool. They marketed themselves as a monitoring company but they really collect a boatload of performance info that you can wade though to find out what's going on on the system being monitored. The alert setup and other monitor type things have to be done through the web GUI. I don't think you can code it though an API. You put whatever instrumentation you want on the server to be monitored, then clone those files and any local changes you made to their code. It doesn't play well for setting up as an automated solution like stand alone monitoring packages. It's $15/node, which, if you 5000 nodes, you're talking real money. Go with an on-prem solution rather than something that's cloud based. Those can be configured and deployed painlessly. -- Michael Vilain 650-322-6755 > On 26-Jul-2018, at 10:05 AM 🌞, Malcolm Greene wrote: > > Looking for feedback on anyone who's using a cloud based > monitoring/logging service with Python's standard lib logging module, > eg. services such as Datadog, Loggly, Papertrailapp, Scalyr, LogDNA, > Logz.io, Logentries, Loggr, Logstats? > Would appreciate hearing your experience, pros, cons, > recommendations, etc. > Thanks! > Malcolm > -- > https://mail.python.org/mailman/listinfo/python-list -- https://mail.python.org/mailman/listinfo/python-list
[ANN] aioxmpp 0.10 released
Dear subscribers, We are pleased to announce the release of aioxmpp 0.10. The current release can be obtained from GitHub [1] (check out the v0.10.0 tag) or PyPI [2]. The HTML documentation can be found at [3]. Examples can be found in the GitHub repository, in the examples sub directory. aioxmpp is a Python library based on asyncio. It implements the client side of the XMPP protocol (RFC 6120 and others). For a more detailed description of the package, please review the README of the package on GitHub [1] or on PyPI [2]. For more information on XMPP, please see [8]. aioxmpp is licensed under the terms of the GNU Lesser General Public License Version 3.0 or later. Version 0.10 is a feature release. * Support for XEP-0077 (In-Band Registration) was contributed by Sergio Alemany [@gersiete]. * Support for requesting an HTTP upload slot via XEP-0363 (HTTP Upload) and support for requesting and replying to XEP-0092 (Software Version) requests. Aside from these newly supported XEPs, much of the work has been on plumbing. Some of the highlights include: * New timeout logic which should help on links with high latency * Enumification of Stanza and Stream Error Conditions * Streamlinging of the aioxmpp.im interfaces and support for MUC invitations. The full list of new features is, as always, included in the changelog [9] included in the official documentation. Bugs, feature requests, patches and questions can be directed to either the aioxmpp mailing list [4], the GitHub issue tracker [5] or the XMPP Multi-User chat [6], whatever floats your boat. Please direct security-relevant issue reports directly to me (jo...@wielicki.name), preferably encrypted using my GPG public key [7]. best regards and happy-asyncio-ing, The aioxmpp team [1]: https://github.com/horazont/aioxmpp [2]: https://pypi.python.org/pypi/aioxmpp [3]: https://docs.zombofant.net/aioxmpp/0.10/ [4]: https://lists.zombofant.net/mailman/listinfo/aioxmpp-devel [5]: https://github.com/horazont/aioxmpp/issues [6]: aiox...@conference.zombofant.net [7]: https://sks-keyservers.net/pks/lookup?op=get&search=0xE5EDE5AC679E300F AA5A 78FF 508D 8CF4 F355 F682 E5ED E5AC 679E 300F [8]: https://xmpp.org/ [9]: https://docs.zombofant.net/aioxmpp/0.10/api/ changelog.html#version-0-10 @gersiete: https://github.com/Gersiete signature.asc Description: This is a digitally signed message part. -- https://mail.python.org/mailman/listinfo/python-list
Re: Anyone using cloud based monitoring/logging services with Python logging module?
Malcolm Greene writes: > Looking for feedback on anyone who's using a cloud based > monitoring/logging service with Python's standard lib logging module, The free-software Sentry https://sentry.io/> is full-featured, implemented in PYthon, and available to set up on your own hosting or pay someone else to host it. This means you can choose Sentry as your logging service, and that leaves you free to choose (and change your mind later) how Sentry itself gets hosted. You're not tied to some vendor's hosted instance. It integrates very well with logging frameworks of many languages, including Python's ‘logging’ module. -- \ “When I turned two I was really anxious, because I'd doubled my | `\ age in a year. I thought, if this keeps up, by the time I'm six | _o__) I'll be ninety.” —Steven Wright | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list