decorators-descriptors | Descriptors Decoded '' PyCon US 2017 Tutorial

 by   fluentpython Python Version: Current License: MIT

kandi X-RAY | decorators-descriptors Summary

kandi X-RAY | decorators-descriptors Summary

decorators-descriptors is a Python library. decorators-descriptors has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. However decorators-descriptors build file is not available. You can download it from GitHub.

Python developers use decorators and descriptors on a daily basis, but many don't understand them well enough to create (or debug) them. Decorators are widely deployed in popular Python Web frameworks. Descriptors are the key to the database mappers used with those frameworks, but under the covers they play an even more crucial role in Python as the device that turns plain functions into bound methods, setting the value of the self argument. This tutorial is a gentle introduction these important Python features, using a test-driven presentation and exercises. Decorators without closures are presented first, highlighting the difference between run time and import time that is crucial when meta-programming. We then get a firm grounding on closures and how they are implemented in Python, before moving to higher order function decorators. Coverage of descriptors starts with a close look at Python's property built-in function and dynamic attribute look up. We then implement some ORM-like field validation descriptors, encounter a usability problem, and leverage a class decorator to solve the issue. A metaclass appears briefly at the very end to make the solution transparent to our library users, while making the library maintainers life more interesting.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              decorators-descriptors has a low active ecosystem.
              It has 71 star(s) with 33 fork(s). There are 9 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              decorators-descriptors has no issues reported. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of decorators-descriptors is current.

            kandi-Quality Quality

              decorators-descriptors has 0 bugs and 0 code smells.

            kandi-Security Security

              decorators-descriptors has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              decorators-descriptors code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              decorators-descriptors is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              decorators-descriptors releases are not available. You will need to build from source code and install.
              decorators-descriptors has no build file. You will be need to create the build yourself to build the component from source.
              It has 792 lines of code, 153 functions and 49 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed decorators-descriptors and discovered the below as its top functions. This is intended to give you an instant insight into decorators-descriptors implemented functionality, and help decide if they suit your requirements.
            • Return HTML
            • Return HTML representation of an object
            • Prints the 3rd program
            • Prints the 3 4 3 block
            • Get subtotal
            • Returns the weight of the metric
            • Return Fibonacci number
            • Run function
            • Factorial
            • Wrapper for f2
            • Wrapper for function
            • Snooze the given number of seconds
            • Display the first page
            Get all kandi verified functions for this library.

            decorators-descriptors Key Features

            No Key Features are available at this moment for decorators-descriptors.

            decorators-descriptors Examples and Code Snippets

            No Code Snippets are available at this moment for decorators-descriptors.

            Community Discussions

            No Community Discussions are available at this moment for decorators-descriptors.Refer to stack overflow page for discussions.

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install decorators-descriptors

            You can download it from GitHub.
            You can use decorators-descriptors like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/fluentpython/decorators-descriptors.git

          • CLI

            gh repo clone fluentpython/decorators-descriptors

          • sshUrl

            git@github.com:fluentpython/decorators-descriptors.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link