FLOSS Project Planets

Bay Area Drupal Camp: Summit Registration is Now Open!

Planet Drupal - Mon, 2017-09-18 13:54
Summit Registration is Now Open! Grace Lovelace Mon, 09/18/2017 - 10:54am BADCamp Drupal Summits

Summits are one-day events focused around specific topics and areas of practice that gather people in specific industries or with specific skills to dive deep into the issues that matter and collaborate freely.


Sign Up for a Summit Today!


Nonprofit Summit (Wed)

The BADCamp Nonprofit Summit (NPS) is back in Berkeley for 2017 with even more opportunities for nonprofits and developers to collaborate, learn, and grow! We’ve got a full day of case studies, presentations, and small-group breakout sessions, all led by nonprofit tech experts. Come discover new tools and strategies, learn how to use them, and make contacts with other members of the Drupal nonprofit community!

Higher Ed Summit (Thurs)

The Higher Education Summit is a unique opportunity for site owners, IT managers, developers, content creators, and agencies dedicated to supporting and advancing the use of Drupal in academia to share, learn, and strengthen our community of practice. Through panels, talks, and ample breakout sessions, participants share and learn from one another’s victories and challenges, and build momentum in cross-institutional initiatives. Drupal behind the login. This year's theme is using Drupal as a collaboration tool (intranets, research sites, data sharing, administrative tasks, portals, etc.).

Front End Summit (Thursday)

Perhaps more than any other discipline, front-end development has been rapidly evolving over the past several years to accommodate an ever-changing variety of workflows, toolsets, best practices, and technologies. As BADCamp turns 10, let us acknowledge the past, assess current trends, and discuss the future of front-end development at the Frontend Summit.

Backdrop Summit (Wed)

Backdrop CMS is a content management system based on the Drupal you know and love, but with a new mission that aims to decrease the cost of long-term website ownership. The goal of this Drupal fork is to empower more people to do more things on the web. At the Backdrop Summit you'll learn about the Backdrop software and its differences from the Drupal CMS.

DevOps Summit (Thurs)

Want to accelerate development at your organization? The DevOps Summit is about inspiring people (aka YOU) with new processes and tools to help transform ideas into working web applications. We’ll be discussing topics like automated testing, continuous integration, local development, ChatOps, and more. Along the way you’ll have a chance to pick the brains of leading DevOps professionals in the Drupal community. Anyone who is looking to work with happier development teams while saving time and money should attend.

  Do you think BADCamp is awesome?

Would you have been willing to pay for your ticket?  If so, then you can give back to the camp by purchasing an individual sponsorship at the level most comfortable for you. As our thanks, we will be handing out some awesome BADCamp swag as our thanks.

We need your help!

BADCamp is 100% volunteer driven and we need your hands! We need stout hearts to volunteer and help set up, tear down, give directions and so much more!  If you are local and can help us, please sign up on our Volunteer Form.


A BIG thanks to our sponsors who have committed early. Without them this magical event wouldn’t be possible. Interested in sponsoring BADCamp? Contact matt@badcamp.net or anne@badcamp.net

Thank you to Pantheon & Acquia for sponsoring at the Core level to help keep BADCamp free and awesome.

Drupal Planet
Categories: FLOSS Project Planets

Colan Schwartz: Client-side encryption options now available in Drupal

Planet Drupal - Mon, 2017-09-18 13:24

After the success of last year's GSOC project with Drupal, I thought it would be a great idea to see if we could take what we did there (server-side encryption) and do something similar on the client side. The benefit of this approach is that unencrypted content/data is never seen by the hosting server. So it's not necessary to trust it to the same degree. This has been a requested feature for some time, and become very popular within the instant-messaging space.

I posted the idea, but wasn't sure how much traction there would be given the additional complexity. Before long, there were two interested students, Marcin Czarnecki and Tameesh Biswas, who were interested in the project given their interest in cryptography. They both wrote very good proposals, which we in the Drupal community accepted.

With the help of Adam Bergstein (my co-mentor from last year) and Talha Paracha (last year's student), we were able to mentor both students in working towards completing their projects, even with the added complexity. Unlike last year, users' passwords couldn't be used to encrypt anything because the site has access to these. An out-of-band mechanism was necessary to perform the encryption, public-key cryptography. It needed to be in the hands of users themselves instead of being handled implicitly by the server.

I'm delighted to report that both students passed. The community can now take their projects and build upon them. Please review the new Drupal modules at Client-side content encryption (overview) and Client Side File Crypto (overview). If there are any issues, please open tickets in the respective queues.

This article, Client-side encryption options now available in Drupal, appeared first on the Colan Schwartz Consulting Services blog.

Categories: FLOSS Project Planets

NumFOCUS: The Econ-ARK joins NumFOCUS Sponsored Projects

Planet Python - Mon, 2017-09-18 13:06
​NumFOCUS is pleased to announce the addition of the Econ-ARK to our fiscally sponsored projects. As a complement to the thriving QuantEcon project (also a NumFOCUS sponsored project), the Econ-ARK is creating an open-source resource containing the tools needed to understand how diversity across economic agents (in preferences, circumstances, knowledge, etc) leads to richer and […]
Categories: FLOSS Project Planets

Zato Blog: Building a protocol-agnostic API for SMS text messaging with Zato and Twilio

Planet Python - Mon, 2017-09-18 12:48

This blog post discusses an integration scenario that showcases a new feature in Zato 3.0 - SMS texting with Twilio.


Suppose you'd like to send text messages that originate from multiple sources, from multiple systems communicating natively over different protocols, such as the most commonly used ones:

  • REST
  • AMQP
  • WebSockets
  • FTP
  • WebSphere MQ

Naturally, the list could grow but the main points are that:

  • Ubiquitous as it is, HTTP is far from being the only protocol used in more complex environments
  • You don't want to distribute credentials to Twilio to each of backend or frontend systems that wants to text

The solution is to route all the messages through a dedicated Zato service that will:

  • Offer to each system communication in their own native protocol
  • Be the only place where credentials are kept

Let's say that the system that we are building will send text messages informing customers about the availability of their order. For simplicity, only REST and AMQP will be shown below but the same principle will hold for other protocols that Zato supports.

Code # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals # Zato from zato.server.service import Service class SMSAdapter(Service): """ Sends template-based text messages to users given on input. """ name = 'sms.adapter' class SimpleIO: input_required = ('user_name', 'order_no') def get_phone_number(self, user_name): """ Returns a phone number by user_name.+1234567890 In practice, this would be read from a database or cache. """ users = { 'mary.major': '+15550101', 'john.doe': '+15550102', } return users[user_name] def handle(self): # In a real system there would be more templates, # perhaps in multiple natural languages, and they would be stored in files # on disk instead of directly in the body of a service. template = "Hello, we are happy to let you know that" \ "your order #{order_no} is ready for pickup." # Get phone number from DB phone_number = self.get_phone_number(self.request.input.user_name) # Convert the template to an actual message msg = template.format(order_no=self.request.input.order_no) # Get connection to Twilio sms = self.out.sms.twilio.get('My SMS') # Send messages sms.conn.send(msg, to=phone_number)

In reality, the code would contain more logic, for instance to look up users in an SQL or Cassandra database or to send messages based on different templates but to illustrate the point, the service above will suffice.

Note that the service uses SimpleIO which means it can be used with both JSON and XML even if only the former is used in the example.

This is the only piece of code needed and the rest is simply configuration in web-admin described below.

Channel configuration

The service needs to be mounted on channels - in this scenario it will be HTTP/REST and AMQP ones but could be any other as required in a given integration project.

In all cases, however, no changes to the code are needed in order to support additional protocols - assigning a service to a channel is merely a matter of additional configuration without any coding.

Twilio configuration

Fill out the form in Connections -> SMS -> Twilio to get a new connection to Twilio SMS messaging facilities. Account SID and token are the same values that you are given by Twilio for your account.

Default from is useful if you typically send messages from the same number or nickname. On the other hand, default to is handy if the recipient is usually the same for all messages sent. Both of these values can be always overridden on a per call basis.

Invocation samples

We can now invoke the service from both curl and RabbitMQ's GUI:


In either case, the result is a text message delivered to the intended recipient :-)

There is more!

It is frequently very convenient to test connections without actually having to develop any code - this is why SMS Twilio connections offer a form to do exactly that. Just click on 'Send a message', fill in your message, click Submit and you're done!


Authoring API services, including ones that send text messages with Twilio is an easy matter with Zato.

Multiple input protocols are supported out of the box and you can rest assured that API keys and other credentials never sprawl all throughout the infrastructure, everything is contained in a single place.

Categories: FLOSS Project Planets

Deeson: Where to find Deeson at DrupalCon Vienna 2017

Planet Drupal - Mon, 2017-09-18 12:06

It’s official: Deeson is in the top 30 of companies contributing to Drupal globally! As huge proponents of open source we’re proud to be playing a key role in supporting the health of the project, and this is testament to the hard work of our development team.

Next week we’re heading to DrupalCon Vienna 2017. We’re pleased to sponsor the Women in Drupal event again this year, and in the spirit of sharing what we’ve learned we’ll also be delivering several sessions throughout the event. Here’s a taste of what to expect:

Component driven front-end development

John Ennew. 26th September, 2.15pm in Lehar 2.

Pages are dead - long live components.

With a component based approach your development team can maintain a catalogue of templates independent of the backend CMS.

When the backend work starts, these components will then be integrated into Drupal. This talk will describe a method for doing this which does not cause complex themes or copying pieces of template code out of the front-end prototypes.

This talk will cover:

  • The general approach to component based development
  • A method for developing components independent of the backend system which will be used
  • How to integrate the components with Drupal 8
  • An overview of the advantages of this approach
Building social websites with Group and Open Social

Kristiaan Van den Eynde. 27th September, 10.45am in Lehar 1.

A lot of Drupal sites are run by only a handful of people. A few power users receive the rights to administer other user accounts, some others can post and publish content and everyone else can just view content and “use” the site. It’s when this scenario doesn’t suit your needs that you might want to have a look at the Group module.

Group allows you to give people similar permissions like those above but only for smaller subsections of a website. Say you run a school website and you want students to be able to only see the courses that are available for them to enroll in, but nothing else. Or you want to run a social network where users can post content, but only within their sandboxed area on the website. Group’s got you covered.

This session will be a brief description of the Group module by its author Kristiaan Van den Eynde (Deeson) and explain its key concepts. We will demo how to configure it and then show you how Group is used in the wonderful Open Social distribution.

Joining us for the second part of the presentation, Jochem van Nieuwenhuijsen (GoalGorilla / Open Social) will explain how Group enabled a team of talented developers to build a social network using Drupal 8. He will list some of the challenges and show you some of the cool stuff they built on top of the Group module.

This session is suitable for developers with some experience with Drupal 8 site building, but most of the presentation should be easy to digest for even the most junior site builders.

Birds of a Feather sessions

Drupal recently announced that Vienna will be the last European conference for the foreseeable future, and that they will host BoFs at the event for the community to discuss the future. 

If you’re not familiar with the BoF format, DrupalCon describes them as “informal gatherings of like-minded individuals who wish to discuss a certain topic without a pre-planned agenda”. This year, Deeson team members are delivering five BoF sessions:

Facilitating happy, high performing distributed teams

Tim Deeson. 26th September, 10.45am in Galerie 11-12. 

An opportunity to share tips and tools for what you've found works or problems you want help with.

At Deeson we've found a mix of tools, processes and relationship building is key. And that sharing what works for us and learning from others is invaluable.

  • Are there tools that you find that really make a difference?
  • Any team events or activities that help people get to know each other?
  • How do you spot if someone isn't happy or engaged?
  • What methods works or doesn't work for different types of personalities?
  • Is always-on Slack a blessing or a curse?
  • Do in-person events matter or can everything be done online?
  • Do you have a structured way of supporting the team to get know each other well?

Bookmark this session

Agile and agencies

John Ennew. 27th September, 1pm in Galerie 15-16. 

The are many ways to run an Agile project.

Much of the written support for working with Agile is based on an internal team which doesn't always support to how the client and agency relationship works.

Agencies have a variety of mechanisms for running an Agile project from simply embedding the ceremonies of Agile to actually ensuring the project team, client and contract are Agile from the start. 

Come along and share your experiences (highs and lows), your tips and your best practices for making Agile work in an Agency.

Bookmark this session

Creating technical excellence in the tech team

John Ennew. 28th September, 2.15pm in Galerie 11-12.

Are you a technical lead?

Come and meet like minded people to share your experiences in managing your team members and ensuring technical excellence.

Bookmark this session

The road ahead for Group: New features and future development

Kristiaan Van den Eynde. 27th September, 3.45pm in Galerie 15-16.

This BoF is intended for site builders who are actively using Group for Drupal 8 and are wondering what's currently planned for development or for site builders who think there is a key feature missing from Group 8 right now. The goal is to either learn about what's coming or to actually add something to the roadmap, provided it would be useful to a larger audience.

Bookmark this session

Reinventing the entity access layer (Node access for all entities)

Kristiaan Van den Eynde. 28th September, 12pm in Galerie 13-14.

This BoF is intended for those involved in https://www.drupal.org/node/777578 and all those who wish to participate by writing a proof of concept or by brainstorming over possible approaches.

Bookmark this session

Heading to DrupalCon Vienna 2017? We’d love to meet you! Drop us a line on Twitter if you want to chat to us or email hello@deeson.co.uk.

Categories: FLOSS Project Planets

Python Software Foundation: Improving Python and Expanding Access: How the PSF Uses Your Donation

Planet Python - Mon, 2017-09-18 12:02

The PSF is excited to announce its first ever membership drive beginning on September 18th!  Our goal for this inaugural drive is to raise $4,000.00 USD in donations and sign up 3,000 new members in 30 days.

If you’ve never donated to the PSF,  you've let your membership lapse, or you've thought about becoming a Supporting Member - here is your chance to make a difference.

Join the PSF as a Supporting Member or Donate to the PSF
You can donate as an individual or join the PSF as a Supporting Member. Supporting members pay $99.00 USD per year to help sustain the Foundation and support the Python community. Supporting members are also eligible to vote for candidates for the PSF Board of Directors, changes in the PSF bylaws, and other matters related to the infrastructure of the foundation.

To become a supporting member or to make a donation, click on the widget here and follow the instructions at the bottom of the page.

We know many of you already make a great effort to support us; you volunteer your time to help us keep our website going, you join working groups to help with marketing, sponsorship, grant requests, trademarks, Python education, and packaging. Even more, you help the PSF put on PyCon US, a conference we couldn’t do without the help of our volunteers. The collective efforts and contributions of our volunteers help drive our work. We will forever be grateful to the people who step forward and ask, “What can I do to help advance open source technology related to Python?”
We understand that not everyone has the time to volunteer, but perhaps you’re in a position to help financially.
We’re asking those who are able, to donate money to support sprints, meet ups, and community events. Donations support Python documentation, fiscal sponsorships, software development, and community projects. They help fund the critical tools programmers use every day.

If you're not in a position to contribute financially, that's ok. Basic membership is free and we welcome anyone who would like to join at this level. Register here to create your member account, log back in, then complete the form to become a basic member.

What does the PSF do?
  • We fund great projects. So far this year we have approved over $200,000.00 USD in grants to over 140 events worldwide. We’re on track to surpass last year’s total of $265,000.00 USD in grants to 137 events in 45 different countries.

  • We organize and host PyCon US. This year’s event brought together 3,389 attendees from 41 countries, a new record for PyCon! Our sponsors’ support enabled us to award $89,000.00 USD in financial aid to 194 attendees.

  • We celebrate awesome Python contributors. Community Service Awards are given out quarterly, honoring individuals who support our mission. 

  • We implemented a trial Python Ambassador program that we hope to expand in the next year. This program provides funding for a dedicated Pythonista to travel locally to perform Python outreach. 

  • We provide fiscal sponsorship support for Python projects, where the PSF collects targeted donations and reimburses expenses on that projects' behalf.

  • We support Python programmers worldwide by funding sprints and workshops that enable people to work on Python-related projects that advance the mission of the PSF. 

Here is what one of our sponsors has to say about why they contribute to the PSF:

“Work on stuff that matters is one of O’Reilly’s core principles, and we know how very much open source matters. The open source community spurs innovation, shares knowledge, encourages growth, and creates industries. The Python Software Foundation is a prime example of the power of open source, showing how focused, thoughtful, and consistent efforts can create a community whose impact extends far beyond meetups and lines of code. O’Reilly is proud to continue to sponsor this great foundation.”
-- Rachel Roumeliotis, Vice President at O’Reilly Media and Chair of OSCON

Lastly, if you’d like to share the news about the PSF’s Membership drive, please share a tweet via the tweet button here:

Or share a tweet with the following text:
Donation & Membership Drive @ThePSF. Help us raise $4K and register 3K new members in 30 days! http://bit.ly/2h3dxpb #idonatedtothepsf
We at the PSF want to thank you for all that you do. Your support is what makes the PSF possible.

Categories: FLOSS Project Planets

Michy Alice: Putting some of my Python knowledge to a good use: a Reddit reading bot!

Planet Python - Mon, 2017-09-18 11:26

One of the perks of knowing a programming language is that you can build your own tools and applications. Depending on what you need, it may even be a fast process since you usually do not need to write production grade code and a detailed documentation (although it might still be helpful in the future).

I’ve got used to read news stuff on Reddit, however, it sometimes can be a bit time consuming since it tends to keep you wandering through every and each rabbit hole that pops up. This is fine if you are commuting and have just some spare time to spend on browsing the web but sometimes I just need a quick glance at what’s new and relevant to my interests.

In order to automate this search process, I’ve written a bot that takes as input a list of subreddits, a list of keywords and flags and browses each subreddit looking for the given keywords.

If a keyword is found inside either the body or in the title of a post which has been submitted in one of the selected subreddits, the post title and the links are either printed in the console or saved in a file (in this case the file name must be supplied when starting the search).

The bot is written using praw.

What do I need to use the bot?

In order to use the bot you’ll need to set up an app using your Reddit account and save the client_id, client_secret, username and password in a file named config_data.py which should be stored in the same folder as the reddit_browsing_bot_main.py script.

How does the bot work?

The bot is designed to be a command line application and can be used either in Linux terminal or in the PowerShell if you are the Windows type ;)

This choice of adopting a CLI was undoubtebly a bad choice if I wanted to make other people use the application but in my case I am the end user, and I like command line tools, a lot.

For each subreddit entered, the bot checks if that subreddit exists, if it doesn’t the subreddit is discarded. Then, within each subreddit, the bot searches the first –l posts and returns the posts that contained at least a keyword.

This is an example of use:

reddit_browsing_bot_main.py -s python -k pycon -l 80 -f new -o output.txt –vIn the example above I am searching the first 80 posts in the “new” section of the python
subreddit for posts that mention pycon. The –o flag tells the program to output the results
of the search to the output.txt file. The –v flag makes the program print the output to the
console.You can search in more subreddits and/or use more keywords, just separate each new
subreddit/keyword with a comma. If you did not supply an output file, the program will
just output the results to the console.Type:reddit_browsing_bot_main.py -hfor a help menu. Maybe in the future I’ll add some features but for now this is pretty much it. Is it ok to use the bot?As far as I know, the bot is not violating any of the terms written in the Reddit’s API. Also,
the API calls are already limited by the praw module in order to comply with the Reddit’s
API limits. The bot is not downvoting nor upvoting any post, it just reads what is online.Anyway, should you want to check the code yourself, it is available on my GitHub.I’ve also copied and pasted a gist below so that you can have a look at the code here:
Categories: FLOSS Project Planets

Possbility and Probability: The curse of knowledge: Finding os.getenv()

Planet Python - Mon, 2017-09-18 10:24

Recently I was working with a co-worker on an unusual nginx problem. While working on the nginx issue we happened to look at some of my Python code. My co-worker normally does not do a lot of Python development, she … Continue reading →

The post The curse of knowledge: Finding os.getenv() appeared first on Possibility and Probability.

Categories: FLOSS Project Planets

Drop Guard: Drop Guard is cutting costs by 40% - facts and figures

Planet Drupal - Mon, 2017-09-18 09:45
Drop Guard is cutting costs by 40% - facts and figures

While working with other NGOs and agencies during the last 1,5 years, we collected more and more information about the time and money that Drop Guard will save your agency. On our website, we claim that Drop Guard will cut your update costs by 40%. CTOs and COOs want to challenge numbers like this and ask how exactly this ROI is calculated. That’s why I want to share the detailed information in this blog post with you.

Security updates are released every Wednesday. If you work in a Drupal shop that cares about security, you have to apply updates for every site every Wednesday or at least Thursday.

Drupal Business Drupal Planet
Categories: FLOSS Project Planets

Chromatic: How To: Multiple Authors in Drupal

Planet Drupal - Mon, 2017-09-18 09:35

A brief rundown of how to configure Drupal to display multiple content authors.

Categories: FLOSS Project Planets

DataCamp: DataCamp and Springboard Are Working Together To Get You a Data Science Job!

Planet Python - Mon, 2017-09-18 09:18

DataCamp and Springboard are coming together to advance learning and career outcomes for aspiring data scientists.  

Joining forces was an obvious choice. Springboard’s human-centered approach to online learning perfectly complemented DataCamp’s expertise in interactive learning exercises. Together, we’ve created the Data Science Career Track, the first mentor-led data science bootcamp to come with a job guarantee. 

Each student in the Data Science Career Track will be assigned a personal industry mentor who’ll advise them on technical skills, project execution, and career advancement. Springboard’s expert-curated data science curriculum will be paired with DataCamp’s interactive exercises for a seamless learning experience. Finally, a career coach will work with students on interview skills, resume building, and personalized job searches to help them find the ideal data science position. 

The course is selective: about 18% of applicants are allowed to enroll after going through the admission process.

For eligible students, the course guarantees that you’ll find a job within six months after graduation or your money back.  

For a limited time only (until October 16th), you can use the code LOVEDATA to get $200 off if the Data Science Career Track. Click here for more information

Categories: FLOSS Project Planets

Doug Hellmann: gc — Garbage Collector — PyMOTW 3

Planet Python - Mon, 2017-09-18 09:00
gc exposes the underlying memory management mechanism of Python, the automatic garbage collector. The module includes functions for controlling how the collector operates and to examine the objects known to the system, either pending collection or stuck in reference cycles and unable to be freed. Read more… This post is part of the Python Module …
Categories: FLOSS Project Planets

Appnovation Technologies: Appnovator Spotlight: Richard Hales

Planet Drupal - Mon, 2017-09-18 08:41
Appnovator Spotlight: Richard Hales Who are you? What's your story?  Richard Hales - "Talent Acquisition". With 13 years in recruitment, working with some top global brands, hiring some of the best talent. I now use that experience and those connections to find the very best people for Appnovation What's your role at Appnovation?  Working in the UK, I am ideally placed to serv...
Categories: FLOSS Project Planets

Mike Driscoll: PyDev of the Week: Daniel Roseman

Planet Python - Mon, 2017-09-18 08:30

This week we welcome Daniel Roseman as our PyDev of the Week. I stumbled across Daniel on StackOverflow via some of the Python answers he has given. He is in the top 0.01% overall on StackOverflow, which is pretty impressive. He also has an old blog with a few interesting Python related articles in it. You can see what he’s been up to lately over on Github. Let’s take a few moments to get to know Daniel better!

Can you tell us a little about yourself (hobbies, education, etc):

I’m a self-taught programmer – my degree is actually in French – and I spent ten years working as a journalist and sub-editor before finally making the move into professional web development.

Since then I’ve worked at Global Radio, Glasses Direct, Google, and now the UK’s Government Digital Service, where I’m currently a technical architect on the publishing platform for the GOV.UK website.

Outside of work I’m a singer in various amateur choirs. I’ve also been running a Code Club at a local primary school for several years, helping ten and eleven year olds with their first introduction to programming using Scratch and later Python itself.

Why did you start using Python?

I got involved in helping out with a website for a charity, which was originally written in Python using Zope 2. Until then I’d never done any Python, and one of the original developers (thanks, Yoz!) helped me get started and pointed me towards Dive Into Python, which was an excellent resource for learning the language.

The charity site was quite basic at that time and didn’t have a proper CMS, so I looked around for technologies to make it more usable. That’s how I discovered Django, which was just then beginning to make an impact; this was around the time of the earliest open-source releases, version 0.90 or so. I fell in love with Django and was quickly able to use it to rebuild the site completely, and I’ve never looked back.

What other programming languages do you know and which is your favorite?

Most of my current team’s work is in Ruby, so professionally I’ve been mainly doing that for the last three years or so. There’s also some Go, although I haven’t done much there myself.

Python definitely remains my favourite. Although I do like a lot of things that Ruby brings, Python is still the language that fits my brain best.

What projects are you working on now?

I don’t get a lot of time for real open-source work because of family stuff and other commitments, so I tend to just contribute various bug fixes and minor features when I can.

One current project though is to see if I can use my experience with Code Club to write an introduction for kids to web development with Django. There are a few kids’ programming tutorials using Python, but nothing specifically focused on the web. It’s mainly inspired by the fantastic Django Girls tutorial, but I want to see if it’s possible to do an introduction from the ground up to all the relevant technologies for a much younger age group. It’s a long-term project though, so it’ll be a while before there’s anything ready to show.

Which Python libraries are your favorite (core or 3rd party)?

Obviously I’d put Django high up there on my list of favourites. It’s what got me properly into Python, and helped me find my first jobs in web development. There’s a great mix of usability and functionality, as well as a huge amount of third-party packages for just about anything.

How did you end up becoming one of the top “gurus” on StackOverflow for Python?

Persistence, and more than a little of “Someone is wrong on the Internet” syndrome. Like many programmers I do like to help and share my knowledge, and contributing to SO has been a really good way for me to do that: hopefully I’ve helped many many people there. And I get a lot of satisfaction from helping people who are trying their best to make something work, but have somehow misunderstood a concept or struggle to see why things aren’t doing what they think they should.

On top of that, I do like to write, but I rarely get the opportunity to sit down and write long articles or blog posts; but answering a question on SO with an explanation or code snippet takes only a minute or so. In effect, helping people on StackOverflow is my main contribution to the open source community.

For those wondering how I manage to answer so many questions, the feed of most recent Python and Django questions is in my RSS reader; so I often encounter a question I’d like to answer while I’m just browsing on the train to work, for example. I’ve become quite good at entering code examples using my phone keyboard.

What do you like the most about StackOverflow versus other tech help websites?

Mainly the direct focus on actual programming questions and answers. There’s a very clear idea of what is on- and off-topic there, and anything that isn’t an actual question about how to solve a specific programming problem quickly gets closed. Similarly, it enables and encourages posters to go back and edit their questions to post relevant details they may have missed out, making them more relevant and clearer.

Of course, the flip side of this is that it does cause it does sometimes appear unwelcoming to newcomers, who often don’t know exactly how to ask questions and get defensive when asked for more details. I’ve given a short talk at a couple of meetups about what exactly does make a good question and how to maximise the possibility you’ll get an answer; the slides are here: https://www.slideshare.net/danielroseman/asking-good-questions-53621064

On the other hand, there are a few things I don’t like. One of them, perhaps surprisingly, is the points system; I have far too many points. While that is to a certain extent because I contribute a lot, it’s also not insignificantly due to the fact that I joined early and wrote some “canonical” answers that get voted up a lot, even years later. Some of those answers aren’t even very good, but they continue to get votes precisely because they already have votes. I’m not really sure how this could be improved, though.

Thanks for doing the interview!

Categories: FLOSS Project Planets

Django Weekly: DjangoWeekly 56 - Free continuous delivery eBook from GoCD, A Complete Beginner's Guide to Django 2

Planet Python - Mon, 2017-09-18 08:04
Worthy Read
Free continuous delivery eBook from GoCDThis free reference guide will take you back to the basics. You’ll find visuals and definitions on key concepts and questions you need to answer about your teams to determine your readiness for continuous delivery. Download and share with your team.
advert, GoCD
A Complete Beginner's Guide to Django - Part 2Welcome to the second part of our Django Tutorial! In the previous lesson, we installed everything that we needed. Hopefully, you are all setup with Python 3.6 installed and Django 1.11 running inside a Virtual Environment. We already created the project we are going to play around. In this lesson, we are going to keep writing code in the same project.
Load Testing a Django Application using LocustIOLocustIO, an open source tool written in python, is used for load testing of web applications. It is simple and easy to use with web UI to view the test results. It is scalable and can be distributed over multiple machines. This article demonstrates an example to use locust for load testing of our django web application.
Django Girls Impact Report 2016-2017This Impact Report aims to celebrate achievements of the Django Girls community in the past two years, and showcase the incredible growth of the organization. For the first time ever, we're also presenting results of a survey we conducted with almost 600 past Django Girls attendees to see if Django Girls Foundation actually achieves the goal of our mission: to bring more women into tech industry!
Simple Nested API Using Django REST FrameworkIn this article you will learn how to build a simple REST API using Django REST Framework. The code in this article was written with Python 3.6, Django 1.11 and DRF 3.6 in mind.
Token Authentication and Authorization with GraphQL and DjangoIn my case, I wanted to use my existing Django Rest Framework (DRF) Token authentication endpoints alongside GraphQL. I'll be using a class-based view approach for Django, DRF, and Graphene.
GraphQL, token auth
Retrying Asynchronous Tasks With CeleryWriting resilient code that can handle task failure is important for maintaining modern functional systems. We’ll be going over how to retry asynchronous tasks with celery in python, commonly used in django applications.
The India edition of Two Scoops of Django 1.11 is available on Flipkart and Amazon!The Indian Edition of the awesome Two Scoops of Django 1.11 is now on Flipkart and Amazon. Rejoice Django Developers from Indian.
Compare yourself to over 1,000 DevOps peers to see how they manage their processesHow do you compare?
Embed docs directly on your website with a few lines of codeTest the API for free.
How to Deploy Django Applications to AWS Using NanoboxIn this article, I'm going to walk through deploying a Django application to AWS using Nanobox. Nanobox uses Docker to provision local development environments, local staging environments, and scalable, highly-available production environments on AWS.
Multitenancy: juggling customer data in DjangoSuppose you want to build a new SaaS (Software as a Service) application. Suppose your application will store sensitive data from your customers. What is the best way to guarantee the isolation of the data and make sure information from one client does not leak to the other? The answer to that is: it depends. It depends on the number of customers you are planning to have. It depends on the size of your company. It depends on the technical skills of the developers working on the platform. And it depends on how sensitive the data is. In this article, I'll go over some of the architectures you can adopt in your application to tackle this problem and how to apply them in Django.
Obey the Testing Goat! Second Edition is outThe book is available both for free and for money. It's all about TDD and Web programming. Read it here!.
test driven development
Django Multiprocessingmultiprocessing
Use corresponding serializer class for different request method in Django Rest FrameworkDjango Rest Framework(DRF) provide a extremely convenience way to develop RESTful apps. Such as generics module, which contains many useful APIView based on the request method.
My Django Docker imageA description, step by step of how I builded my docker django image, how i loaded it on docker hub and how can be use it and customized.
docker, dockerfile

django-clever-cache - 0 Stars, 0 ForkDjango cache backend with automatic granular invalidation.
django-simple-affiliate - 0 Stars, 0 ForkThis is a very simple library that can be used to provide affiliate links in your django application. It is intentionally very lightweight, allowing your application to do whatever it wants with the data.
Categories: FLOSS Project Planets

Vardot: What Is A Chatbot, And Why Is It Important For Your Business?

Planet Drupal - Mon, 2017-09-18 07:06
What Is A Chatbot, And Why Is It Important For Your Business? Dmitrii Susloparov Mon, 09/18/2017 - 14:06

There is a great deal of enthusiasm surrounding chatbots in the Internet technology world today. Fanning the flames was the news that the White House had created a Facebook chatbot using Drupal. This post explains what a chatbot is, its current status, and how it can benefit business enterprises.

What is a chatbot?

Chatbots are software agents which communicate and collaborate with human users through text messaging using a natural language, say English, to accomplish specific tasks. Examples of common tasks in a business context are product inquiries, ordering, and troubleshooting.


Chatbots holds the promise of being the next generation of technology that people use to interact online with business enterprises. From a historical perspective, the first generation of customer contact technology involves websites. Users opens the company website within their browser, navigate web pages to get the information they want and to trigger various e-commerce transactions, such as ordering a product. Next up are mobile apps which users can download on their smartphones or tablets. The problem with apps is that people have to manually download and learn to use each of them. Chatbots lead the way for the next wave of technology. With chatbots, there are no new apps to download. This is because most users already have at least 1 instant messaging application installed on their communication devices, e.g., SMS, Facebook Messenger, Slack, Telegram, Kik, etc. Another advantage for chatbots is that, because chatbots communicate using a natural language, users don't need to learn yet another new website interface and to get comfortable with the unavoidable quirks.


The chatbot interface is powered by Artificial Intelligence (AI) technologies. AI is tasked to understand the text that users enter and pass on the knowledge to the backend for processing. Another benefit of using AI is that the chatbot will learn over time to better understand user preferences and as a result, deliver better and faster services.

Why are chatbots important to enterprises?

It was reported that, in 2016, for the first time in Internet history, there were more people using messaging apps than social media. It follows that chat has outpaced social media to become the de facto standard in how mobile users want to make contact. Mobile users are known to be an impatient bunch, ready to abandon any website en masse if they are made to wait for mere seconds after their initial request. Is your business staffed properly to handle this 24x7 onslaught of customer product queries, sales orders, and support requests?


Image Source: Business Insider


Chatbots can be programmed to monitor and respond to those chat sessions that fall within their domain expertise, such as troubleshooting, return merchandise authorization (RMA), sales inquiry, etc. For chatbots to do their job, enterprises first need to capture the aforementioned domain knowledge in a knowledge base. Once the knowledge becomes accessible, chatbots can staff the all-important corporate functions 24x7.


By deploying chatbots, a business can save money by easing the staff head count while guaranteeing good service response time. Besides its always-on feature, another major advantage of using chatbots is the consistency in how your business processes are applied: chatbots will execute the business logic consistently in all customer contacts.


Chatbots, advanced that it is, is not the panacea of all enterprise customer service problems, nor does it completely replace the entire human work force. Human agents are still required to solve the more complex problems that are beyond the ability of chatbots. While chatbots can resolve the most basic troubleshooting tasks, second-level support technicians are still required to tackle the complicated product issues.

State of the union

The chatbot technology is still an emerging technology. There are many components that have to work together to make chatbots work. As of today, the technology stack is not standardized, and a clear market leader has not yet manifested itself.


Just as there are many messaging apps, there are as many, if not more, chatbot building platforms, each designed to work with a subset of specific messaging apps. Some messaging app vendors, such as Facebook and Telegram, also provide their own official chatbot building platforms. Besides those, there are other third-party chatbot platforms that support multiple messaging apps. For instance, Chatfuel is a chatbot platform that supports both Facebook and Telegram. The Microsoft Bot Framework supports Facebook Messenger, Slack, and SMS.


Most chatbot building platforms claim that chatbots can be developed in minutes with no coding required. While creating a chatbot may take only minutes, making it do something useful involves customization including configuring the AI front-end engine, the e-commerce and payment processor backend, etc. Given the myriad technical choices and possibilities, it is best to leverage professional help to guide the development of chatbots for your business enterprise.

Chatbots and Drupal

Many businesses have already crafted their online presence in the form of a website using an enterprise-class CMS technology, for instance, Drupal. The good news is that you can add chatbot technology to your existing technology infrastructure, rather than starting from scratch.


If you have already built an enterprise-class Drupal website, you are a one-step ahead of everyone else. The Drupal infrastructure is essentially a portal that captures your business logic, including the backend portion that interfaces with your e-commerce and other back office systems. Adding chatbots to your overall technology stack involves adding the proper middleware to connect your chatbot frontend with your Drupal-based business logic backend.


As stated in the previous section, chatbots itself is an emerging technology that may be outside the scope for most in-house development expertise. Adding the middleware to join together chatbots and your Drupal backend is an extra level of software complexity. This middleware framework is available from the Drupal community, but is currently in a very early stage for commercialization. To ensure success for your chatbot project, professional consulting is highly recommended.


If you require professional services, whether to build from scratch an enterprise-class Drupal website with chatbot integration, or to add chatbot capabilities to your existing Drupal platform, Vardot is pleased to offer such services from its Jordanian headquarters or its American and Egyptian regional offices. Contact us now for more details regarding your project!

Categories: FLOSS Project Planets

Deeson: Component driven front-end development

Planet Drupal - Mon, 2017-09-18 06:58

At Deeson we’ve been working on ways to develop our front-end independently from any back-end application.

Our front-end team has developed web applications using decoupled JavaScript frameworks including Angular and React but we’ve found that for many website projects a full web application is overkill and the traditional HTML templating approach is still the most efficient.

Our back-end application is usually Drupal but we’re increasingly using other frameworks such as Laravel or Symfony and would like to be able to use a consistent approach for our front-end teams. 

We’ve developed a system for this that allows modern build tools, practices Component Driven Development, allows the generation of living style guides and is agnostic to the back-end.

Component Driven Development 

A component, for us, is a collection of HTML, CSS and JS that goes together to form some display element. Consider this against a more traditional approach where HTML, CSS and JS are stored in separate global files, for example, in a global style.css and app.js files.

By grouping code together into components, we separate our application by the domain language, rather than arbitrarily by file extension. This isolates components and makes them easier to develop and maintain.

Components get named based on the domain language of the project and client. Components are not defined for the designer by the limitations and modeling of the application. This provides a common language for the designers, developers and client and reduces the chances of misunderstanding when it comes to the development of functionality.

Using the BEM approach to structuring CSS we isolate much of our CSS to specific components rather than continuously generalising CSS in the way a CSS framework like Bootstrap does. This isolates much of the CSS to a specific component giving us high cohesion and low coupling allowing for confident maintenance, removing much of the fear of wondering what effect changing a piece of CSS is will have on the whole site.

This better matches the way that we work where the complexity of our challenging designs mean rapid delivery using a CSS framework isn’t possible.

Living style guides

The output of our front-end development will include a style guide which will render each of our components into static pages.

Style guides are useful as they demonstrate the components independently of the specific implementation. This allows more rapid front-end development as front-end developers can work without having to worry about how the back-end will integrate.

Over time, however, these style guides move out of sync with the applications they were developed to provide styling information for. An application developer's job is to integrate the HTML provided by the style guide into the finished site. This has meant copying and pasting code out of the style guide templates and into the application’s templating system.

At this point we have duplication of code and the ability to maintain a strict style guide is lost. When the style guide is updated, all the application templates affected must be identified and updated as well.

Our approach makes the style guide a living style guide. The front-end templates we produce for our components get referenced directly from the target applications theme system. This means that our front-end templates are the exact same ones that the application will be using within the theme.

Front-end developers can make changes to it knowing that those changes will flow through into the application without need for a second step.

For Drupal developers this means either providing new theme functions for the front-end templates or referencing our front-end templates from within Drupal templates.

Modern build tools, agnostic to the back-end

Freed from the constraints of a specific application’s templating system we can select the most appropriate tools for the job of front-end development.

Our front-end tooling uses the latest standards and tools. We’re using yarn for package management, and webpack to bundle the static assets. 

Very little knowledge of the back-end is assumed or needed in this approach. You can confidently bring new front-end developers onto your team who are used to using the latest tools without having to spend the first few weeks teaching them the specific theming language and quirks of your back-end application such as the Drupal theme layer.

A real example 

We’ve got an exemplar project to showcase this way of working. If you clone the project at https://github.com/teamdeeson/cdd-demo and follow the instructions in the README you’ll get a Drupal 8 project up and running with a theme that uses this process. You’ll see we’ve developed a componentised version of the Bartik theme for this.

If you are intrigued by this and would like to hear more, you’ll enjoy my talk on the subject at DrupalCon Vienna on 26th September.

In summary

Component driven front-end development has worked well for us at Deeson, allowing rapid independent development of our front-end code. Our designers are freed from the previous constraints of designing for a Drupal website and our developers get to use the latest tools and get onboarded quicker.

Like the sound of the way we do things? We're currently hiring a Senior Front-end Developer.

Categories: FLOSS Project Planets

Reuven Lerner: My favorite terrible Python error message

Planet Python - Mon, 2017-09-18 03:39

Students in my Python classes occasionally get the following error message:

TypeError: object() takes no parameters

This error message is technically true, as I’ll explain in a moment. But it’s surprising and confusing for people who are new to Python, because it doesn’t point to the source of the actual problem.

Here’s the basic idea: Python methods are attributes, which means that when we invoke methods, Python needs to search for the attribute we’ve named. In other words, if I invoke:


then Python will first look for the “m” attribute on the “o” object. If “o” has an attribute named “m” (i.e., if hasattr(o, ‘m’) returns True) then it retrieves the attribute’s value, and tries to call it.

However, Python methods aren’t defined on individual objects. They’re defined on classes. Which means that in almost all cases, if “m” is an actual method that can be invoked on “o”, there won’t be any “m” attribute on “o”.  Instead, we’ll need to look at type(o), the class to which “o” belongs, and look there.

And indeed, that’s how attributes work in Python: First search on the named object. If the attribute isn’t there, then look at the object’s class.  So we look for “m” on o’s class.  If the attribute is there, then it is invoked.  That’s what happens in normal method calls.

But say that the attribute isn’t on the class, either. What then? Python continues its search, looking next at the class from which type(o) inherits — which is located on the attribute type(o).__bases__.  This is a tuple, because Python classes can inherit from more than one parent; let’s ignore that for now.

Most classes inherit from the base object in the Python universe, known as “object”.  In Python 3, if you don’t specify “object” as the base from which you inherit, then it’s done for you automatically. In Python 2, failing to specify that a class inherits from “object” means that you have an “old-style class,” which will operate differently. I continue to specify “object” in my Python 3 classes, partly out of habit, partly because I think it looks nicer, and partly because I want my code to be compatible across versions as much as possible.

What happens if the attribute doesn’t exist on “object”?  Then we get an “attribute error,” with Python telling us that the attribute doesn’t exist.

However, this isn’t what happens in the case of the error message I showed:

TypeError: object() takes no parameters

This error message happens when you try to create a new instance of a class. For example:

class Foo(object):     pass

If I say

f = Foo()

then I don’t get any error message. But if I say

f = Foo(10)

then I get the TypeError.  Why?

Because Python objects are created in two stages: First, the object is created in the __new__ method. This is a method that we almost never want to write; let Python take care of the allocation and creation of new objects.

However, __new__ doesn’t immediately return the object that it has created. Rather, it first searches for an __init__ method, whose job is to add new attributes to the newly created object. How does it look for (and then invoke) __init__?  It turns to the new object, which I’ll call “o” here, and invokes


So, what happens now? Python looks for “__init__” on “o”, but doesn’t find it.  It looks for “__init__” on type(o), aka the “Foo” class, and doesn’t find it.  So it keeps searching, and looks on “object” for an “__init__” attribute.

Good news: object.__init__ exists!  Moreover, it’s a method!  So Python tries to invoke it, passing the argument that I handed to Foo (i.e., 10).  But object.__init__ doesn’t take any arguments. And thus we get the error message

TypeError: object() takes no parameters

What’s especially confusing, for me and many of my students, is that Python doesn’t say, “object.__init__()” takes no parameters. So they’re not sure how object figures into this, or where their mistake might be.

After reading this, though, I’m hoping that you can guess what it means: Simply put, this error message says, “You forgot to define an __init__ method on your object.”  This can be out of forgetfulness, but I’ve also seen people forget one or more of the underscores on either side of “__init__”, or even (my favorite) define a method called “__int__”, which is great for converting objects into integers, but not for initializing attributes.

So, is the error message wrong? No, it’s perfectly logical. But as with many “perfectly logical” things, it makes sense after you are steeped in the overall logic of the system, and tends to confuse those who most need the help.

The post My favorite terrible Python error message appeared first on Lerner Consulting Blog.

Categories: FLOSS Project Planets

Catalin George Festila: YARA python module - part 002 .

Planet Python - Mon, 2017-09-18 01:43
This is another part of YARA python tutorial and the goal of this part is install the yara modules.
The YARA modules provides extending features to allow us to define data structures and functions which can be used in your rules to express more complex conditions.
You can also write your own modules.
Some known modules used by YARA are:
  • PE
  • ELF
  • Cuckoo
  • Magic
  • Hash
  • Math
First you need to install or reinstall YARA to the last version:
>>> yara.__version__
'3.6.3'The Cuckoo module enables you to create YARA rules based on behavioral information generated by a Cuckoo sandbox.
C:\Python27\Scripts>pip install yara-python
Collecting yara-python
Downloading yara_python-3.6.3-cp27-cp27m-win32.whl (606kB)
100% |################################| 614kB 1.3MB/s
Installing collected packages: yara-python
Successfully installed yara-python-3.6.3
pip install cuckoo
Collecting cuckoo
Downloading Cuckoo- (3.1MB)
100% |################################| 3.1MB 255kB/s
Successfully installed Mako-1.0.7 alembic-0.8.8 androguard-3.0.1 beautifulsoup4-4.5.3 capstone-windows-3.0.4 chardet-2.3.0 click-6.6 colorama-0.3.7 cuckoo- django-1.8.4 django-extensions-1.6.7 dpkt-1.8.7 ecdsa-0.13 egghatch-0.2.1 elasticsearch-5.3.0 flask-sqlalchemy-2.1 httpreplay-0.2.1 jsbeautifier-1.6.2 jsonschema-2.6.0 olefile-0.43 oletools-0.42 peepdf-0.3.6 pefile2-1.2.11 pillow-3.2.0 pyelftools-0.24 pymisp-2.4.54 pymongo-3.0.3 python-dateutil-2.4.2 python-editor-1.0.3 python-magic-0.4.12 pythonaes-1.0 requests-2.13.0 sflock-0.2.16 sqlalchemy-1.0.8 tlslite-ng-0.6.0 unicorn-1.0.1 wakeonlan-0.2.2Let's test this python module:>>> import cuckoo
>>> from cuckoo import *
>>> dir(cuckoo)
['__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__', '__version__', 'auxiliary', 'common', 'compat', 'core', 'machinery', 'misc', 'plugins', 'processing', 'reporting', 'signatures', 'web']Let's test some yara modules:
>>> import yara
>>> rule = yara.compile(source='import \"pe\"')
>>> rule = yara.compile(source='import \"elf\"')
>>> rule = yara.compile(source='import \"cuckoo\"')
>>> rule = yara.compile(source='import \"math\"')
I could not use the YARA modules: hash and magic.
I will solve this problem in the future.
You can also write your own modules ( see this webpage ).
Categories: FLOSS Project Planets

Bryan Pendleton: News of the weird, part 4 (of four)

Planet Apache - Sun, 2017-09-17 23:13

Well, this isn't exactly news, and I guess you'll have to judge for yourself whether it's weird or not.

But I thought both of these were pretty interesting.

  • How Half Of America Lost Its F**king MindThere's this universal shorthand that epic adventure movies use to tell the good guys from the bad. The good guys are simple folk from the countryside ...

    ... while the bad guys are decadent assholes who live in the city and wear stupid clothes.

    The theme expresses itself in several ways -- primitive vs. advanced, tough vs. delicate, masculine vs. feminine, poor vs. rich, pure vs. decadent, traditional vs. weird. All of it is code for rural vs. urban. That tense divide between the two doesn't exist because of these movies, obviously. These movies used it as shorthand because the divide already existed.

  • I Spent 5 Years With Some of Trump’s Biggest Fans. Here’s What They Won’t Tell You.Pervasive among the people I talked to was a sense of detachment from a distant elite with whom they had ever less contact and less in common.


    Trump has put on his blue-collar cap, pumped his fist in the air, and left mainstream Republicans helpless. Not only does he speak to the white working class’ grievances; as they see it, he has finally stopped their story from being politically suppressed. We may never know if Trump has done this intentionally or instinctively, but in any case he’s created a movement much like the anti-immigrant but pro-welfare-state right-wing populism on the rise in Europe. For these are all based on variations of the same Deep Story of personal protectionism.

Categories: FLOSS Project Planets
Syndicate content