Continuous Code

Sourcery reviews your code everywhere you work and automatically suggests improvements

def sourcery(spellbook):
    result = []
    for spell in spellbook:
        if spell.is_awesome:
            result.append(spell)
    return result

Trusted by THOUSANDS OF engineers

CiscoRevolutHelloFreshSkyCisco2Revolut2HelloFresh2Sky2

AND WE’RE IMPROVING THE WORLD’S CODE EVERY DAY

1,000,000+

Lines of code removed

80,000+

Installs

100k+

Monthly Improvements

from quality import clean_code

Ensure clean code all the time

Teams with high quality code are 50+% more efficient than teams working with low quality code.

Get instant suggestions on how to improve your code and make it follow best practices.

while is_Learning: knowledge.append(information)

Fix issues everywhere in one command

Fix every instance of an issue across your codebase with a single command. Just define a rule, run it in the CLI, and it`s fixed.

Whether it`s a standard best practice or refactoring you want to make in 100s of places, we`ve got you covered.

%timeit code.review()

Catch quality issues before code review

Catch issues before code reviews by building your rules, standards, and best practices into code.

Get feedback and fixes on any code not following those standards in real time while you work.

rules:
- id: filter-lambda-to-list-comprehension
  pattern: |
      list(filter(lambda ${arg}: ${expr}, ${items}))
  replacement: |
      [${arg} for ${arg} in ${items} if ${expr}]
  description: |
      Use list comprehensions instead of filter and lambda
code.Lock()

Code never leaves your device

chip
  • Code never leaves your deviceCode never leaves your device
  • Code never leaves your devicePrivate by design
  • Code never leaves your deviceAES256 encryption

cat examples.py

Real time recommendations

Explore some examples that show how Sourcery can dramatically improve the code you create, whether you develop for fun or professionally.

Write Pythonic code

From list comprehensions to cutting down on nested conditionals, Sourcery ensures your code follows Python best practices.

def sourcery(spellbook):
    result = []
    for spell in spellbook:
        if spell.is_awesome:
                result.append(spell)
    return result

Removes duplicate code

Sourcery automatically finds, and removes duplicate code. It can even extract duplicate code into their own methods to keep your code clean and simple.

Write your best practices as code

Quickly create rules to flag and replace outdated functionality across your projects.

editors

global availability

Works across your full development lifecycle

“I just found out thanks to @SourceryAI that function cells, can be rewritten to:

def cells(board):
""" Iterate over the cells in a 2D list """
for row in board:
yield from row

learn something every day

Bart Dorlandt

“@SourceryAI is great! I never knew that #Python pathlib`s Path already includes a .read_text() method which has context manager.

read_text() source code:
click here

Alwin Wang

“I refactored and cleaned up all of the Python Bytes code. It’s really nice now

Michael Kennedy

Host of Python Bytes & Talk Python to Me

git commit -m “love”

Loved by developers

# TODO Implement more languages

Additional language support

Don’t use Python? Don’t panic, other languages are coming soon. Tell us what you want next.

JavaScript

C++

Java

SQL

Elixir

C#

Bash

Go

match typeOfUser:

Simple, flexible pricing

For side projects

Free

Basic code quality suggestions

    For professionals

    $12 per month

    Whole project analysis and in depth feedback for your work

      For teams

      $24 per month

      Streamlined code reviews and consistent code quality