Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
### Project-specific ###
.vscode
.direnv/
.envrc

# Created by https://www.toptal.com/developers/gitignore/api/windows,linux,macos,vim,emacs,visualstudiocode,jetbrains+all,python
# Edit at https://www.toptal.com/developers/gitignore?templates=windows,linux,macos,vim,emacs,visualstudiocode,jetbrains+all,python
Expand Down
61 changes: 61 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 47 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
description = "AsyncAPI Python Code Generator - type-safe async Python from AsyncAPI 3 specs";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};

outputs =
{
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
python = pkgs.python310;
in
{
devShells.default = pkgs.mkShell {
name = "asyncapi-python";

packages = with pkgs; [
python
uv
];

shellHook = ''
export UV_PYTHON_PREFERENCE=only-system

if [ ! -d .venv ]; then
echo "Creating virtual environment..."
uv venv
fi

source .venv/bin/activate

echo "AsyncAPI Python development environment"
echo "Python: $(python --version)"
echo "uv: $(uv --version)"
'';
};
}
);
}
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ dependencies = ["pydantic>=2", "pytz"]
[project.optional-dependencies]
codegen = [
"jinja2>=3.1.4",
"typer[all]>=0.12.5",
"typer>=0.15.0",
"click>=8.0.0",
"pyyaml",
"datamodel-code-generator[http]>=0.26.4",
"black",
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.