tern VS import-linter

Compare tern vs import-linter and see what are their differences.

tern

Tern is a software composition analysis tool and Python library that generates a Software Bill of Materials for container images and Dockerfiles. The SBOM that Tern generates will give you a layer-by-layer view of what's inside your container in a variety of formats including human-readable, JSON, HTML, SPDX and more. (by tern-tools)

import-linter

Import Linter allows you to define and enforce rules for the internal and external imports within your Python project. (by seddonym)
Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
tern import-linter
1 4
932 618
0.5% -
3.2 7.6
about 2 months ago 2 months ago
Python Python
BSD 2-clause "Simplified" License BSD 2-clause "Simplified" License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

tern

Posts with mentions or reviews of tern. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-06-30.
  • Learn by reading code: Python standard library design decisions explained
    4 projects | news.ycombinator.com | 30 Jun 2021
    A project you may want to look into adding is Tern [0]. I've had a good time reading through the code over the past couple of weeks, and have found it to be at least not "bad" code, and pretty easy to understand.

    Specifically how they are untarring each container layer and creating a chroot jail to run commands inside is fairly self-contained and interesting.

    [0] https://github.com/tern-tools/tern

import-linter

Posts with mentions or reviews of import-linter. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-12-15.
  • Kraken Technologies: How we organise our large Python monolith
    1 project | news.ycombinator.com | 18 Jul 2023
    Never heard of https://import-linter.readthedocs.io/ before. Not sure if I like this type of solution, but it's interesting, and certainly the problem is real.
  • Maintain a Clean Architecture in Python with Dependency Rules
    4 projects | news.ycombinator.com | 15 Dec 2022
    Before clicking on this, I expected to see import-linter [0] which achieves something very similar but with, in my opinion, a bit less magic. Another solution in a similar spirit is Pants [1], though this is actually a build system which allows you to constrain dependencies between different artifacts (e.g. which modules are allowed to depend on which modules).

    To Sourcery's credit, their product looks much more in the realm of "developer experience" -- closer to Copilot (or what I understand of it) than to import-linter. Props to them for at least having a page about security [2] and building a solution which doesn't inherently require all of your source code to be shared with a vendor's server.

    [0] https://github.com/seddonym/import-linter

    [1] https://www.pantsbuild.org/

    [2] https://docs.sourcery.ai/Product/Permissions-and-Security/

  • Python 3.11.0 final is now available
    11 projects | news.ycombinator.com | 25 Oct 2022
  • Linter for Python architecture
    2 projects | dev.to | 22 Feb 2021
    import-linter on GitHub

What are some alternatives?

When comparing tern and import-linter you can also consider the following projects:

ort - A suite of tools to automate software compliance checks.

dephell - :package: :fire: Python project management. Manage packages: convert between formats, lock, install, resolve, isolate, test, build graph, show outdated, audit. Manage venvs, build package, bump version.

awesome-security-GRC - Curated list of resources for security Governance, Risk Management, Compliance and Audit professionals and enthusiasts (if they exist).

smart-imports - smart imports for Python

cdxgen - Creates CycloneDX Software Bill of Materials (SBOM) for your projects from source and container images. Supports many languages and package managers. Integrate in your CI/CD pipeline with automatic submission to Dependency Track server. Slack: https://cyclonedx.slack.com/archives/C04NFFE1962

python-feedstock - A conda-smithy repository for python.

goodcode - A curated collection of annotated code examples from prominent open-source projects

emerge - Emerge is a browser-based interactive codebase and dependency visualization tool for many different programming languages. It supports some basic code quality and graph metrics and provides a simple and intuitive way to explore and analyze a codebase by using graph structures.

spdx-spec - The SPDX specification in MarkDown and HTML formats.

Django-Styleguide - Django styleguide used in HackSoft projects

spdx-license-matcher - A tool to match license text with SPDX license list using a an algorithm with finds close matches. It follows SPDX Matching guidelines to keep the substantial text as well as ignore the replaceable text for matching purposes.

sigstore-website - Codebase for sigstore.dev