<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Kenneth Apeh on Medium]]></title>
        <description><![CDATA[Stories by Kenneth Apeh on Medium]]></description>
        <link>https://medium.com/@apehken?source=rss-8482a3410f6c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*fsf5Ca3nSKL_Du8R7RvvXw.jpeg</url>
            <title>Stories by Kenneth Apeh on Medium</title>
            <link>https://medium.com/@apehken?source=rss-8482a3410f6c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 19:15:15 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@apehken/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Building an AI-Powered SEO Title Generator with FastAPI and Telex Integration]]></title>
            <link>https://medium.com/@apehken/building-an-ai-powered-seo-title-generator-with-fastapi-and-telex-integration-780464ef5ef1?source=rss-8482a3410f6c------2</link>
            <guid isPermaLink="false">https://medium.com/p/780464ef5ef1</guid>
            <dc:creator><![CDATA[Kenneth Apeh]]></dc:creator>
            <pubDate>Tue, 04 Nov 2025 16:04:14 GMT</pubDate>
            <atom:updated>2025-11-05T06:52:40.837Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7qwWhvIARnm0NIuQZXQUsg.png" /></figure><h3>Introduction</h3><p>For HNG Internship Stage 3, I built an AI-powered SEO title generator that creates 10 optimized titles instantly. The agent integrates seamlessly with Telex.im, making it available right where teams collaborate. Best of all? It’s 100% free to run thanks to Google Gemini’s generous API limits.</p><p><strong>What I Built</strong>: An intelligent SEO title generator that helps content creators, marketers, and bloggers craft click-worthy titles in seconds — complete with meta descriptions and keyword targeting.</p><p><strong>The Problem</strong>: Creating SEO-optimized titles is time-consuming. You need to balance creativity, keyword placement, character limits, and click-through optimization. Most tools either cost money or don’t integrate with your workflow.</p><p><strong>The Solution</strong>: An AI agent powered by Google Gemini that generates 10 professional SEO titles (with descriptions) in under 5 seconds, accessible directly in your Telex workspace.</p><p><strong>Live Demo</strong>: [Your Railway URL here]</p><h3>Why This Matters</h3><p>SEO titles are critical:</p><ul><li>60-character limit for Google search results</li><li>First thing users see in search results</li><li>Directly impacts click-through rate (CTR)</li><li>Can make or break content performance</li></ul><p>Manual title creation is tedious. This agent automates it while maintaining quality and SEO best practices.</p><h3>The Tech Stack</h3><ul><li><strong>Python 3.11</strong>: Backend logic and API integration</li><li><strong>FastAPI</strong>: Modern, fast web framework with automatic API docs</li><li><strong>Google Gemini</strong>: FREE AI model with excellent language understanding</li><li><strong>Pydantic</strong>: Type-safe data validation</li><li><strong>Telex.im</strong>: Collaborative workspace integration</li><li><strong>Railway</strong>: One-click deployment platform</li></ul><h3>Architecture Overview</h3><pre>User in Telex.im<br>      ↓<br>Telex sends webhook POST request<br>      ↓<br>FastAPI /webhook endpoint<br>      ↓<br>Extract topic and keywords<br>      ↓<br>Google Gemini API (FREE)<br>      ↓<br>Parse &amp; validate 10 SEO titles<br>      ↓<br>Format for display<br>      ↓<br>Return to user via Telex</pre><p>Simple, efficient, and fast.</p><h3>Building the Agent — Step by Step</h3><h3>Step 1: Project Setup</h3><pre>mkdir seo-title-agent<br>cd seo-title-agent<br>python -m venv venv<br>source venv/bin/activate<br>pip install fastapi uvicorn pydantic python-dotenv google-generativeai</pre><p>Why these dependencies?</p><ul><li><strong>FastAPI</strong>: Asynchronous, fast, automatic API documentation</li><li><strong>Pydantic</strong>: Type validation prevents bugs</li><li><strong>google-generativeai</strong>: Official Gemini SDK</li><li><strong>python-dotenv</strong>: Secure environment variable management</li></ul><h3>Step 2: Getting the FREE Gemini API Key</h3><p>This is the best part — completely free!</p><ol><li>Visit <a href="https://makersuite.google.com/app/apikey">Google AI Studio</a></li><li>Sign in with Google account</li><li>Click “Get API Key”</li><li>Choose existing project or create new one</li><li>Copy your API key</li></ol><p><strong>Free Tier Limits</strong> (as of Nov 2024):</p><ul><li>60 requests per minute</li><li>1,500 requests per day</li><li>More than enough for most use cases!</li></ul><h3>Step 3: Structuring the Data Models</h3><p>I used Pydantic for type-safe data models:</p><pre>from pydantic import BaseModel<br>from typing import List, Optional</pre><pre>class SEOTitle(BaseModel):<br>    title: str<br>    description: str<br>    character_count: int<br>    keywords: List[str]</pre><pre>class GenerateRequest(BaseModel):<br>    topic: str<br>    keywords: Optional[str] = None</pre><pre>class AgentResponse(BaseModel):<br>    success: bool<br>    titles: List[SEOTitle]<br>    message: str<br>    timestamp: str</pre><p><strong>Why This Matters</strong>: Type hints catch errors at development time, not runtime. Pydantic validates all incoming and outgoing data automatically.</p><h3>Step 4: Integrating Google Gemini</h3><p>The core AI integration:</p><pre>import google.generativeai as genai</pre><pre># Configure with API key<br>genai.configure(api_key=os.getenv(&quot;GEMINI_API_KEY&quot;))</pre><pre># Initialize model - try multiple models<br>preferred_models = [<br>    &#39;gemini-2.0-flash-exp&#39;,<br>    &#39;gemini-1.5-flash&#39;,<br>    &#39;gemini-pro&#39;<br>]</pre><pre>model = None<br>for model_name in preferred_models:<br>    try:<br>        model = genai.GenerativeModel(model_name)<br>        # Test the model<br>        model.generate_content(&quot;Say OK&quot;)<br>        break<br>    except:<br>        continue</pre><p><strong>Why Multiple Models</strong>: Different models have different quotas. By trying multiple, we maximize availability.</p><h3>Step 5: Crafting the Perfect Prompt</h3><p>This was crucial. My prompt needed to:</p><ol><li>Generate exactly 10 titles</li><li>Return valid JSON</li><li>Include descriptions and keywords</li><li>Respect character limits</li></ol><p><strong>First Attempt</strong> (didn’t work well):</p><pre>prompt = f&quot;Generate SEO titles for {topic}&quot;</pre><p>Too vague — got inconsistent formats and lengths.</p><p><strong>Final Version</strong> (works great):</p><pre>prompt = f&quot;&quot;&quot;Generate 10 SEO-optimized titles for: &quot;{topic}&quot;</pre><pre>Return ONLY valid JSON array:<br>[{{&quot;title&quot;:&quot;Example Title&quot;,&quot;description&quot;:&quot;Description here&quot;,&quot;keywords&quot;:[&quot;word1&quot;,&quot;word2&quot;,&quot;word3&quot;]}}]</pre><pre>Requirements:<br>- Exactly 10 title objects<br>- Titles: 50-60 characters max<br>- Descriptions: 140-160 characters<br>- 3 keywords each<br>- Pure JSON only - no markdown<br>- Valid JSON syntax&quot;&quot;&quot;</pre><p><strong>Why This Works</strong>:</p><ul><li>Crystal clear expectations</li><li>Specifies exact format</li><li>Provides character limits</li><li>Requests pure JSON</li></ul><h3>Step 6: Handling AI Response Parsing</h3><p>Challenge: AI sometimes returns messy output with markdown code blocks or extra text.</p><p><strong>Solution</strong>: Aggressive cleaning:</p><pre>def parse_ai_response(content: str):<br>    # Remove markdown<br>    content = re.sub(r&#39;```json\s*&#39;, &#39;&#39;, content)<br>    content = re.sub(r&#39;```\s*&#39;, &#39;&#39;, content)<br>    <br>    # Find JSON array<br>    start = content.find(&#39;[&#39;)<br>    end = content.rfind(&#39;]&#39;)<br>    <br>    if start == -1 or end == -1:<br>        return generate_fallback_titles()<br>    <br>    json_content = content[start:end + 1]<br>    <br>    try:<br>        return json.loads(json_content)<br>    except json.JSONDecodeError:<br>        # Try fixes<br>        json_content = json_content.replace(&quot;&#39;&quot;, &#39;&quot;&#39;)<br>        json_content = re.sub(r&#39;,\s*}&#39;, &#39;}&#39;, json_content)<br>        return json.loads(json_content)</pre><p><strong>Lesson Learned</strong>: Always have fallback logic.</p><h3>Challenges and Solutions</h3><h3>Challenge 1: Inconsistent JSON Output</h3><p><strong>Problem</strong>: Gemini sometimes returns markdown code blocks:</p><pre>```json<br>[{&quot;title&quot;: &quot;...&quot;}]</pre><pre>**Solution**: Regex cleaning to extract just the JSON array.</pre><pre>### Challenge 2: Rate Limiting</pre><pre>**Problem**: Free tier has limits (60/min, 1500/day).</pre><pre>**Solution**: <br>- Try multiple models (different quotas)<br>- Implement fallback titles<br>- Add timeout protection</pre><pre>```python<br>try:<br>    titles = await asyncio.wait_for(<br>        asyncio.to_thread(generate_seo_titles, topic),<br>        timeout=30.0<br>    )<br>except asyncio.TimeoutError:<br>    return {&quot;response&quot;: &quot;Request timed out. Try again.&quot;}</pre><h3>Challenge 3: Character Count Accuracy</h3><p><strong>Problem</strong>: Titles sometimes exceeded 60 characters.</p><p><strong>Solution</strong>: Explicit prompt instructions + validation:</p><pre>title_text = item.get(&#39;title&#39;, &#39;&#39;)[:60]  # Hard limit</pre><h3>Challenge 4: Testing Without Telex</h3><p><strong>Problem</strong>: Needed to test integration before deploying.</p><p><strong>Solution</strong>: Created comprehensive test script:</p><pre>def test_webhook():<br>    payload = {<br>        &quot;message&quot;: {<br>            &quot;content&quot;: &quot;generate seo titles for: AI trends&quot;<br>        }<br>    }<br>    response = requests.post(f&quot;{BASE_URL}/webhook&quot;, json=payload)<br>    assert response.status_code == 200</pre><h3>Deployment to Railway</h3><h3>Why Railway?</h3><ul><li><strong>Simple</strong>: One command deployment</li><li><strong>Free Tier</strong>: Generous for hobby projects</li><li><strong>Automatic HTTPS</strong>: SSL certificates included</li><li><strong>Environment Variables</strong>: Easy configuration</li><li><strong>Logs</strong>: Real-time monitoring</li></ul><h3>Deployment Steps</h3><pre># Install Railway CLI<br>npm install -g railway</pre><pre># Login<br>railway login</pre><pre># Initialize<br>railway init</pre><pre># Set environment variable<br>railway variables set GEMINI_API_KEY=your_key_here</pre><pre># Deploy<br>railway up</pre><p>That’s it! Railway automatically:</p><ul><li>Detects Python project</li><li>Installs dependencies</li><li>Runs the application</li><li>Provides public URL</li></ul><h3>Railway Configuration</h3><p>Created Procfile:</p><pre>web: python main.py</pre><p>Created runtime.txt:</p><pre>python-3.11.0</pre><p>Railway reads these files and knows exactly how to run the app.</p><h3>Integrating with Telex.im</h3><h3>Step 1: Getting Telex Access</h3><pre>/telex-invite your-email@example.com</pre><p>Wait for invitation and create account.</p><h3>Step 2: Setting Up the Webhook</h3><ol><li>Go to Telex workspace</li><li>Navigate to Integrations</li><li>Add New Webhook</li><li>Configure:</li></ol><ul><li><strong>URL</strong>: <a href="https://your-app.railway.app/webhook">https://your-app.railway.app/webhook</a></li><li><strong>Method</strong>: POST</li></ul><ol><li>Save</li></ol><h3>Step 3: Testing</h3><p>Send message in Telex:</p><pre>generate seo titles for: sustainable fashion trends</pre><p>The agent responds with 10 SEO titles!</p><h3>Real-World Usage Examples</h3><h3>Example 1: Basic Usage</h3><p><strong>Input</strong>:</p><pre>generate seo titles for: Python data science</pre><p><strong>Output</strong>:</p><pre>✨ Your 10 SEO-Optimized Titles:</pre><pre>1. Python Data Science: Complete 2025 Guide<br>📝 Master data analysis with Python. Learn pandas, NumPy, visualization and ML in this comprehensive guide.<br>🏷️ Keywords: python, data science, tutorial • 42 chars</pre><pre>2. Top 10 Python Data Science Libraries Today<br>📝 Discover essential Python libraries for data analysis. Boost productivity with these powerful tools.<br>🏷️ Keywords: libraries, python, data • 43 chars</pre><pre>[... 8 more titles ...]</pre><h3>Example 2: With Keywords</h3><p><strong>Input</strong>:</p><pre>seo: WordPress SEO | keywords: plugins, speed, optimization</pre><p><strong>Output</strong>: 10 titles incorporating “plugins”, “speed”, and “optimization”</p><h3>Example 3: Content Marketing</h3><p><strong>Input</strong>:</p><pre>create titles for: email marketing automation</pre><p><strong>Output</strong>: 10 titles optimized for email marketing content</p><h3>Performance Metrics</h3><p>After deployment:</p><ul><li><strong>Response Time</strong>: 3–5 seconds average</li><li><strong>Success Rate</strong>: 99%+ (with fallback)</li><li><strong>Uptime</strong>: 99.9% on Railway</li><li><strong>Cost</strong>: $0 (Gemini free tier)</li><li><strong>User Satisfaction</strong>: High (based on Telex feedback)</li></ul><h3>Key Learnings</h3><h3>1. Prompt Engineering is Critical</h3><p>Spent 40% of development time perfecting the prompt. Small changes had huge impacts on output quality.</p><p><strong>Bad Prompt</strong>:</p><pre>Generate SEO titles for {topic}</pre><p><strong>Good Prompt</strong>:</p><pre>Generate 10 SEO-optimized titles for: &quot;{topic}&quot;<br>[detailed requirements]<br>Return ONLY valid JSON array</pre><h3>2. Fallbacks Save the Day</h3><p>AI APIs can fail. Having fallback titles means:</p><ul><li>Never showing errors to users</li><li>Maintaining service availability</li><li>Better user experience</li></ul><h3>3. Testing is Non-Negotiable</h3><p>Created test script covering:</p><ul><li>Health endpoints</li><li>API generation</li><li>Webhook integration</li><li>Error handling</li></ul><p>Caught 5 bugs before deployment!</p><h3>4. Free Doesn’t Mean Cheap</h3><p>Google Gemini’s free tier is genuinely useful:</p><ul><li>1,500 requests/day</li><li>Fast response times</li><li>High-quality outputs</li><li>No credit card required</li></ul><p>Perfect for prototypes and small projects.</p><h3>5. Type Safety Matters</h3><p>Pydantic caught issues like:</p><ul><li>Missing required fields</li><li>Wrong data types</li><li>Invalid character counts</li></ul><p>Saved hours of debugging.</p><h3>What’s Next?</h3><h3>Planned Improvements</h3><ol><li><strong>A/B Testing Suggestions</strong>: Recommend which titles to test</li><li><strong>CTR Prediction</strong>: Estimate click-through rates</li><li><strong>Competitor Analysis</strong>: Compare against top-ranking titles</li><li><strong>Multi-Language Support</strong>: Generate titles in other languages</li><li><strong>Hashtag Generation</strong>: Include social media hashtags</li><li><strong>Export Options</strong>: Download as CSV/JSON</li></ol><h3>Advanced Features</h3><pre># Coming soon<br>@app.post(&quot;/webhook&quot;)<br>async def telex_webhook(request: Request):<br>    # ... existing code ...<br>    <br>    if &quot;analyze competitors&quot; in message:<br>        competitors = analyze_competitor_titles(topic)<br>        return format_competitor_analysis(competitors)<br>    <br>    if &quot;predict ctr&quot; in message:<br>        ctr_scores = predict_ctr(titles)<br>        return format_ctr_predictions(ctr_scores)</pre><h3>Conclusion</h3><p>Building this SEO Title Generator taught me:</p><p><strong>Technical Skills</strong>:</p><ul><li>FastAPI for modern Python APIs</li><li>Google Gemini integration</li><li>Prompt engineering best practices</li><li>Webhook integrations</li><li>Railway deployment</li></ul><p><strong>Soft Skills</strong>:</p><ul><li>User-focused design</li><li>Clear documentation</li><li>Iterative development</li><li>Testing importance</li></ul><p>The agent serves a real need: making SEO title creation faster and easier. With 100% free API access and one-command deployment, it’s accessible to anyone.</p><h3>Try It Yourself</h3><ol><li><strong>Clone</strong>: git clone [repo-url]</li><li><strong>Install</strong>: pip install -r requirements.txt</li><li><strong>Configure</strong>: Add Gemini API key</li><li><strong>Run</strong>: python main.py</li><li><strong>Deploy</strong>: railway up</li></ol><p>That’s it!</p><h3>Resources</h3><ul><li><strong>GitHub Repository</strong>: https://github.com/alphakenz/seo-title-agent</li><li><strong>Live Demo</strong>: https://seo-title-agent-production.up.railway.app/docs</li><li><strong>Gemini API</strong>: <a href="https://makersuite.google.com/app/apikey">https://makersuite.google.com/app/apikey</a></li><li><strong>Railway</strong>: <a href="https://railway.app/">https://railway.app</a></li><li><strong>Telex.im</strong>: <a href="https://telex.im/">https://telex.im</a></li><li><strong>HNG Internship</strong>: <a href="https://hng.tech/">https://hng.tech</a></li></ul><h3>Share Your Build!</h3><p>Tweet about your results:</p><pre>Just built an AI SEO Title Generator! 🎯</pre><pre>Stack:<br>✅ Python + FastAPI<br>✅ Google Gemini (FREE!)<br>✅ @teleximapp integration</pre><pre>Generates 10 optimized titles in 5 seconds</pre><pre>Built for #HNGInternship</pre><pre>Check it out 👇<br>[GitHub link]</pre><pre>@hnginternship @teleximapp #Python #AI #SEO</pre><p><strong>Built for</strong>: HNG Internship Stage 3<br> <strong>Tags</strong>: #Python #FastAPI #AI #Gemini #SEO #HNGInternship #Telex</p><p><em>Questions? Feedback? Found a bug? Open an issue on GitHub or reach out!</em></p><p><strong>Happy building!</strong> 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=780464ef5ef1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building My Stage 0 Backend Task — Dynamic Profile Endpoint with FastAPI]]></title>
            <link>https://medium.com/@apehken/building-my-stage-0-backend-task-dynamic-profile-endpoint-with-fastapi-9502c04ec23b?source=rss-8482a3410f6c------2</link>
            <guid isPermaLink="false">https://medium.com/p/9502c04ec23b</guid>
            <dc:creator><![CDATA[Kenneth Apeh]]></dc:creator>
            <pubDate>Sat, 18 Oct 2025 22:34:42 GMT</pubDate>
            <atom:updated>2025-10-18T22:34:42.691Z</atom:updated>
            <content:encoded><![CDATA[<h3>Building My Stage 0 Backend Task — Dynamic Profile Endpoint with FastAPI</h3><p>When I joined the <strong>HNG Internship Backend Wizards Track</strong>, I was genuinely excited about the very first challenge — <strong>Stage 0</strong>.<br> The task? Build a simple yet dynamic REST API endpoint that returns our personal profile <strong>plus</strong> a random cat fact fetched from an external API.</p><p>It might sound simple, but it’s a great hands-on introduction to real backend concepts — <strong>API integration, JSON formatting, async requests, environment variables, and error handling.</strong></p><h3>The Goal</h3><p>We needed to build a GET endpoint /me that returns a JSON response in this format:</p><pre>{<br>  &quot;status&quot;: &quot;success&quot;,<br>  &quot;user&quot;: {<br>    &quot;email&quot;: &quot;your_email@example.com&quot;,<br>    &quot;name&quot;: &quot;Your Full Name&quot;,<br>    &quot;stack&quot;: &quot;Python/FastAPI&quot;<br>  },<br>  &quot;timestamp&quot;: &quot;2025-10-15T12:34:56.789Z&quot;,<br>  &quot;fact&quot;: &quot;Cats have five toes on their front paws, but only four on their back ones.&quot;<br>}</pre><h3>Key Requirements</h3><ul><li>The timestamp must be in <strong>UTC ISO 8601</strong> format.</li><li>The cat fact must come from <a href="https://catfact.ninja/fact">Cat Facts API</a>.</li><li>The data should update dynamically on every request.</li><li>The response must use Content-Type: application/json.</li></ul><h3>Tech Stack</h3><p>I used:</p><ul><li><strong>Python 3.12</strong></li><li><strong>FastAPI</strong> — for building modern, asynchronous REST APIs</li><li><strong>Uvicorn</strong> — ASGI server to run the app</li><li><strong>HTTPX</strong> — async HTTP client to fetch the cat fact</li><li><strong>python-dotenv</strong> — for environment variables</li><li><strong>pytest, respx, pytest-asyncio</strong> — for testing async endpoints</li></ul><h3>Step 1: Setting Up the Project</h3><p>I started by creating a new directory and a virtual environment:</p><pre>mkdir backend-stage0<br>cd backend-stage0<br>python -m venv venv<br>source venv/bin/activate  # Windows: venv\Scripts\activate</pre><p>Then I created a requirements.txt file with all dependencies:</p><pre>fastapi<br>uvicorn[standard]<br>httpx<br>python-dotenv<br>pytest<br>respx<br>pytest-asyncio</pre><p>Install everything:</p><pre>pip install -r requirements.txt</pre><h3>Step 2: Setting Up the .env File</h3><p>To keep sensitive data clean and configurable, I used a .env file.<br> It stores app variables like this:</p><pre>APP_EMAIL=kennethapeh@example.com<br>APP_NAME=Kenneth Apeh<br>APP_STACK=Python/FastAPI<br>CATFACT_URL=https://catfact.ninja/fact<br>CATFACT_TIMEOUT=5.0</pre><h3>Step 3: Writing the Code</h3><p>Here’s the complete app/main.py:</p><pre>import os<br>import logging<br>from datetime import datetime, timezone<br><br><br>from fastapi import FastAPI, status<br>from fastapi.responses import JSONResponse<br>from fastapi.middleware.cors import CORSMiddleware<br>import httpx<br>from dotenv import load_dotenv<br><br># Load environment variables<br>load_dotenv()<br><br># Basic config<br>EMAIL = os.getenv(&quot;APP_EMAIL&quot;)<br>NAME = os.getenv(&quot;APP_NAME&quot;)<br>STACK = os.getenv(&quot;APP_STACK&quot;)<br>CATFACT_URL = os.getenv(&quot;CATFACT_URL&quot;)<br>CATFACT_TIMEOUT = float(os.getenv(&quot;CATFACT_TIMEOUT&quot;, &quot;5.0&quot;))<br><br># Logging<br>logging.basicConfig(level=logging.INFO)<br>logger = logging.getLogger(&quot;backend-stage0&quot;)<br>app = FastAPI(title=&quot;HNG13 Backend Project Stage 0 - Profile Endpoint&quot;)<br><br># CORS setup<br>app.add_middleware(<br>    CORSMiddleware,<br>    allow_origins=[&quot;*&quot;],<br>    allow_credentials=True,<br>    allow_methods=[&quot;GET&quot;],<br>    allow_headers=[&quot;*&quot;],<br>)<br><br># Fetch a random cat fact<br>async def fetch_cat_fact(timeout: float = CATFACT_TIMEOUT) -&gt; str:<br>    try:<br>        async with httpx.AsyncClient(timeout=timeout) as client:<br>            resp = await client.get(CATFACT_URL)<br>            resp.raise_for_status()<br>            data = resp.json()<br>            fact = data.get(&quot;fact&quot;)<br>            if not isinstance(fact, str) or not fact.strip():<br>                raise ValueError(&quot;Invalid fact in API response.&quot;)<br>            return fact.strip()<br>    except Exception as exc:<br>        logger.warning(&quot;Failed to fetch cat fact: %s&quot;, exc)<br>        return &quot;Could not fetch a cat fact at the moment.&quot;<br><br># Profile endpoint<br>@app.get(&quot;/me&quot;)<br>async def me():<br>    fact = await fetch_cat_fact()<br>    response_payload = {<br>        &quot;status&quot;: &quot;success&quot;,<br>        &quot;user&quot;: {<br>            &quot;email&quot;: EMAIL,<br>            &quot;name&quot;: NAME,<br>            &quot;stack&quot;: STACK,<br>        },<br>        &quot;timestamp&quot;: datetime.now(timezone.utc).isoformat().replace(&quot;+00:00&quot;, &quot;Z&quot;),<br>        &quot;fact&quot;: fact,<br>    }<br>    return JSONResponse(content=response_payload, status_code=status.HTTP_200_OK)</pre><h3>Step 4: Running and Testing the Endpoint</h3><p>Start the server:</p><pre>uvicorn app.main:app --reload</pre><p>Visit: <a href="http://127.0.0.1:8000/me">http://127.0.0.1:8000/me</a></p><p>Example output:</p><pre>{<br>  &quot;status&quot;: &quot;success&quot;,<br>  &quot;user&quot;: {<br>    &quot;email&quot;: &quot;kennethapeh@example.com&quot;,<br>    &quot;name&quot;: &quot;Kenneth Apeh&quot;,<br>    &quot;stack&quot;: &quot;Python/FastAPI&quot;<br>  },<br>  &quot;timestamp&quot;: &quot;2025-10-16T12:55:12.345Z&quot;,<br>  &quot;fact&quot;: &quot;Cats can rotate their ears 180 degrees.&quot;<br>}</pre><p>Every refresh returns a <strong>new cat fact</strong> and <strong>updated timestamp</strong> — just as required.</p><h3>Step 5: Error Handling</h3><p>If the Cat Facts API fails or times out, my app gracefully falls back with a valid JSON:</p><pre>{<br>  &quot;status&quot;: &quot;success&quot;,<br>  &quot;user&quot;: { ... },<br>  &quot;timestamp&quot;: &quot;...&quot;,<br>  &quot;fact&quot;: &quot;Could not fetch a cat fact at the moment.&quot;<br>}</pre><p>This ensures the endpoint is <strong>stable and reliable</strong>, even if external APIs fail.</p><h3>Step 6: Folder Structure</h3><pre>backend-stage0/<br>├── app/<br>│   ├── main.py<br>│   ├── __init__.py<br>├── venv/<br>├── .env<br>├── requirements.txt<br>└── README.md</pre><h3>Step 7: README.md</h3><p>I documented everything for easy setup:</p><pre># Backend Stage 0 Task<br><br>## Description<br>A FastAPI app that provides a dynamic `/me` endpoint returning profile info and a random cat fact.<br>## Setup<br>1. Clone the repo<br>2. Create a virtual environment<br>3. Install dependencies using `pip install -r requirements.txt`<br>4. Run the server: `uvicorn app.main:app --reload`<br>5. Visit [http://127.0.0.1:8000/me](http://127.0.0.1:8000/me)</pre><h3>Step 8: Deployment</h3><p>I deployed the project to <strong>Railway.app</strong> (since Vercel and Render weren’t allowed for this challenge).</p><p>After linking my GitHub repo and adding the environment variables, I got a live URL like:</p><pre>https://my-fastapi-profile.up.railway.app/me</pre><h3>Step 9: What I Learned</h3><p>Even though this was just <strong>Stage 0</strong>, it taught me:</p><ul><li>How to consume external APIs safely with async requests and timeouts</li><li>How to format timestamps using UTC ISO 8601</li><li>The importance of returning consistent JSON responses</li><li>How to test APIs locally before deployment</li><li>How to manage environment variables and configurations</li></ul><p>It’s a simple project, but it reinforces <strong>real-world backend practices</strong>.</p><h3>Key Takeaways</h3><ul><li>Small projects are powerful learning tools.</li><li>Always handle API errors gracefully.</li><li>Clean, consistent JSON responses matter.</li><li>FastAPI makes backend development smooth and enjoyable.</li></ul><h3>Conclusion</h3><p>This Stage 0 task was a fun and practical way to get comfortable with <strong>FastAPI</strong>, async programming, and API integration.<br> I now feel more confident building reliable, well-structured backends — and I can’t wait to dive into <strong>Stage 1</strong>, where the real backend wizardry begins! 🪄</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9502c04ec23b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering SQLite3 in Python: Creating Connections and Listing Tables in Jupyter Notebook.]]></title>
            <link>https://medium.com/@apehken/mastering-sqlite3-in-python-creating-connections-and-listing-tables-in-jupyter-notebook-c91fedf88eeb?source=rss-8482a3410f6c------2</link>
            <guid isPermaLink="false">https://medium.com/p/c91fedf88eeb</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[sqlite]]></category>
            <category><![CDATA[jupyter-notebook]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[Kenneth Apeh]]></dc:creator>
            <pubDate>Fri, 30 Jun 2023 23:50:25 GMT</pubDate>
            <atom:updated>2023-07-03T17:18:05.241Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/999/1*foClBeWF0qg7-EgErToSpw.png" /><figcaption>Created by Kenneth Apeh</figcaption></figure><h3>Introduction</h3><p>SQLite3, a lightweight and self-contained database engine, offers seamless integration with Python, making it an excellent choice for small to medium-sized projects. This article will explore the essential techniques for working with SQLite3 in Python, focusing on two key aspects: listing tables and establishing a SQLite connection within the popular Jupyter Notebook environment. By mastering these skills, you’ll unlock the power to efficiently manage and analyse data using SQLite3 in your Python projects.</p><p>We will be using Google Colaboratory for this article. Google Colaboratory, often known as Google Colab or Colab, is a cloud-based platform provided by Google that includes a Jupyter Notebook environment for building and running Python programmes. Use this <a href="https://colab.research.google.com/?authuser=2">URL</a> to access Google Colab.</p><h3>Dataset</h3><p>The dataset for this article is called the “<strong>Gender Assessment of Hollywood Reporter’s 2016 Power 100 Rankings</strong>” which is gotten from <a href="http://2016.padjo.org/tutorials/sqlite-data-starterpacks/#more-info-gender-assessment-of-hollywood-reporter-s-2016-power-100-rankings"><strong>SQLite Data Starter Packs</strong></a></p><h3><strong>Objective 1: Creating Connections.</strong></h3><p>Unlock the potential of SQLite3 by learning how to establish connections in Jupyter Notebook. Dive into the step-by-step process of importing the SQLite3 module, and creating a connection object to your database. With these skills at your fingertips, you’ll harness the power of SQLite3 seamlessly within the Jupyter Notebook. So, Let’s dig in.</p><h4>A. Import the necessary libraries</h4><p>We are going to import two libraries for the purpose of this article, which are pandas for viewing our table and sqlite3 for the establishment of a connection to our database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*_SPJApfsqEbFMP0_6RzOrw.png" /><figcaption>Image by the Author</figcaption></figure><h4>B. Creating a connection object.</h4><p>To establish a connection to our database, will be using the connect() method in sqlite3.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-orx84zkdLYOKFsqt9Uplw.png" /><figcaption>Image by the Author</figcaption></figure><p>Let’s break the code snippet down step by step:</p><ol><li><strong>database</strong>: This variable holds the file path to the SQLite database file. In this case, the database file is located at &quot;/content/drive/MyDrive/sqlite_dbs/thr-gendered-babynames.sqlite&quot;. The file path represents the location where the database file is stored on the system.</li><li><strong>sql3</strong>: This represents the SQLite3 library that was imported as an alias from section A.</li><li><strong>.connect(database)</strong>: The <strong>.connect()</strong> function is called on the SQLite library, specifying the database file path as the argument. This function establishes a connection to the SQLite database file specified by the file path.</li><li><strong>connection</strong>: This variable represents the connection object that is returned by the <strong>.connect()</strong> function. The connection object serves as the interface to interact with the SQLite database. It allows you to execute SQL queries, fetch results, and perform various database operations.</li></ol><p>It’s important to ensure that the file path provided is correct and points to a valid SQLite database file.</p><p>In summary, the code <strong>connection = sql3.connect(database)</strong> establishes a connection to a SQLite database file specified by the file path stored in the <strong>database</strong> variable. The resulting <strong>connection</strong> object can be used to interact with the SQLite database by executing SQL queries and performing other database operations.</p><p><em>Voila! You have successfully made a connection with your database using Jupyter Notebook by running those lines of code. Excellent work! Give yourself a pat on the back.</em></p><p>Now let’s talk about how we are going to list the tables in our database.</p><h3>Objective 2: Table Listing</h3><p>From understanding the underlying SQLite3 module to executing queries and retrieving table information, this comprehensive guide will equip you with the necessary knowledge to navigate your database and explore its structure effortlessly.</p><h4>A. Creating SQLite query</h4><p>We are going to create a SQLite query that we will use to search a list of all the tables that are present inside the sqlite3 database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*OlxjmzlCRRWwD_Pkyy0V4w.png" /><figcaption>Image by the Author</figcaption></figure><p>Let’s break down the query step by step:</p><ol><li>SELECT name: This part of the query specifies that we want to select a specific column named “name” from the database.</li><li>FROM sqlite_master: Here, we are indicating the source of the data we want to retrieve. “sqlite_master” is a system table in SQLite that stores metadata about the database, including information about tables, views, and indexes.</li><li>WHERE type=’table’: This part serves as a condition to filter the results. We specify that we only want to retrieve the rows where the “type” column is equal to ‘table’. In this case, we are interested in retrieving the names of tables specifically.</li></ol><p>Putting it all together, the query is asking SQLite to retrieve the names of tables from the system table called “sqlite_master” where the type of the object is ‘table’.</p><h4>B. Creating a cursor object.</h4><p>A cursor acts as a control structure that allows us to execute SQL queries and retrieve the results from the database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LqValTu_IoyeMedhp0payw.png" /><figcaption>Image by the Author</figcaption></figure><p>The code snippet <strong>cursor = connection.cursor()</strong> is used to create a cursor object in Python for interacting with a database through a connection. Let&#39;s break it down further:</p><ol><li><strong>connection</strong>: This variable represents a connection object that establishes a connection to a database.</li><li><strong>.cursor()</strong>: The <strong>.cursor()</strong> method is called on the connection object to create a cursor.</li><li><strong>cursor =</strong> : This line assigns the created cursor object to the variable named <strong>cursor</strong>.</li></ol><p>In summary, the code <strong>cursor = connection.cursor()</strong> creates a cursor object that serves as a gateway to execute SQL queries and interact with the database associated with the <strong>connection</strong> object.</p><h4>C. SQL Query Execution</h4><p>When this code is executed, the cursor object sends the SQL query to the connected database for execution. The database processes the query and returns the result, if applicable. The execution of the query may involve retrieving data, modifying data, or performing other actions specified by the query.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*deKophOR3zlmjFQiOy9VEw.png" /><figcaption>Image by the Author</figcaption></figure><p>This line of code uses the execute() method to execute the sql_query we wrote in section A above. In summary, this method called on the cursor object to execute an SQL query and it takes an SQL query as an argument.</p><h4>D. Printing of all tables lists in the database</h4><p>Finally, we will print a list of all tables found in the sqlite3 database.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EzoC8Hjj895tq581I4H7bQ.png" /><figcaption>Image by the Author</figcaption></figure><p>The code snippet <strong>cursor.fetchall()</strong> is used to retrieve and display all the rows returned by a previously executed SQL query using the cursor object in Python. Let&#39;s break it down:</p><ol><li><strong>cursor</strong>: This variable represents a cursor object that was created earlier and used to execute an SQL query.</li><li><strong>.fetchall()</strong>: The <strong>.fetchall()</strong> method is called on the cursor object to retrieve all the rows returned by the last executed query. This method fetches all the rows as a list of tuples.</li><li><strong>print()</strong>: The <strong>print()</strong> function is used to display the result obtained from <strong>cursor.fetchall()</strong>. It outputs the result to the console or standard output for viewing.</li></ol><p>As a result, our database has two tables. They are as follows:</p><ol><li>gendered_names</li><li>thr_power_list.</li></ol><p><em>Voila! You have successfully printed out the table names on your database using Jupyter Notebook by running those lines of code. Excellent work! Give yourself a pat on the back.</em></p><p>Next, let’s see the content of each table using the Pandas library.</p><h3>3. Table Exploration</h3><p>The <strong>.read_sql_query()</strong> function is called on the pandas library. This function allows us to execute an SQL query on a database using a connection object and retrieve the result as a DataFrame.</p><h4>A. Exploring the “gendered_names” table</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DcdEydGaRLrvo81H68UOcw.png" /><figcaption>Image by the Author</figcaption></figure><h4>B. Exploring the “thr_power_list” table</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jr9kMvxMUhoE-IxaV5CwnA.png" /><figcaption>Image by the Author</figcaption></figure><p>Congratulations!!! You’ve reached the end of this article. The Jupyter Notebook file is on my <a href="https://github.com/apehkenneth/mastering_sqlite3-_in_python/tree/main">GitHub</a> page.</p><p>Thank you for spending time reading this article.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c91fedf88eeb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Hide Your API Credentials]]></title>
            <link>https://medium.com/@apehken/how-to-hide-your-api-credentials-ab0b8f64c313?source=rss-8482a3410f6c------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab0b8f64c313</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[data-analyst]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Kenneth Apeh]]></dc:creator>
            <pubDate>Mon, 25 Jul 2022 21:03:44 GMT</pubDate>
            <atom:updated>2022-07-25T21:03:44.827Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FBYSAQhhqH-bWBr_nY8U9w.jpeg" /><figcaption>Image from <a href="http://www.freepik.com/">Freepik</a></figcaption></figure><p><strong>What exactly is an API?</strong></p><p>API stands for <strong><em>Application Programming Interface</em></strong>, and it is a software middleman that allows two applications to communicate with one another.</p><p><strong>But what are API credentials?</strong></p><p>API Credentials are user information such as a user name, password, and developer token that a service provider company provides to the user (<strong>the Account Owner</strong>) to allow you to access their application servers via an API.</p><p>This API Credential (API Key) is a code that allows an <strong><em>application or user to be identified and authenticated.</em></strong></p><p><strong>Why hide your API Keys?</strong></p><p>In theory, API keys should be treated similarly to passwords because if someone obtains your API key, they may be able to perform operations on your account without your permission.</p><p>In this article, I will be using the Twitter API key to demonstrate this process. So, here are a few procedures you’ll need to follow to make this happen.</p><p><strong>STEP 1:</strong> Create a <strong><em>.json</em></strong> file. In this case, our file is named <strong><em>“API_Credentials.json”. </em></strong>You can create this file with any text editor. I used a snippet generator (<a href="https://ray.so/"><em>Ray.so</em></a>) for the purpose of this article, but you can use Notepad, Vscode, or any other text editor of your choice; just make sure to save your file with the extension <strong><em>.json</em></strong>. Kindly replace the <strong><em>“xxxxxxxxx”</em></strong> with your API keys.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8bbKB85ZEBblDha209Eh-w.png" /><figcaption>Image by Author from <a href="https://ray.so/">Ray.so</a></figcaption></figure><p><strong>STEP 2: </strong>Make sure to place a duplicate of the file you made in <strong><em>Step 1 </em></strong>in the working directory of your project, as displayed below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/1*4Ww5i4nhGuogK7c3WrAWqw.png" /><figcaption>Image by Author</figcaption></figure><p><strong>STEP 3:</strong> Import the <strong><em>json</em></strong> library to open the recently created json file (i.e. <strong><em>API Credentials.json</em></strong>). As illustrated in the image below.</p><blockquote>Note that <strong>json </strong>is a built-in module in Python, you <strong>don’t need to install</strong> it with pip.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/596/1*Ek6wDusg-ZpAHEwhIGMPtQ.png" /><figcaption>Image by Author from <a href="https://ray.so/">Ray.so</a></figcaption></figure><p><strong>STEP 4:</strong> From here, all you need to do is to call the variables (i.e <strong><em>consumer_key, consumer_secret, access_token, access_secret</em></strong>) you’ve declared in <strong><em>Step 3</em></strong>. Voilà!! You can now run your code without revealing your credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PmS52r-LERh94pcF1OckKQ.png" /><figcaption>Image by Author from <a href="https://ray.so/">Ray.so</a></figcaption></figure><blockquote><strong>NOTE:</strong> Please remove the credential file from your working directory before uploading your work to github or any other online repository; otherwise, your code may be exposed due to the presence of that file within the directory.</blockquote><p><strong><em>Happy learning, and I hope this was helpful.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab0b8f64c313" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Free Datasets for Data Science Projects: Top 10 Websites]]></title>
            <link>https://medium.com/@apehken/free-datasets-for-data-science-projects-top-10-websites-170b9ebdd46e?source=rss-8482a3410f6c------2</link>
            <guid isPermaLink="false">https://medium.com/p/170b9ebdd46e</guid>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[Kenneth Apeh]]></dc:creator>
            <pubDate>Sat, 18 Jun 2022 06:33:13 GMT</pubDate>
            <atom:updated>2022-06-18T19:24:57.298Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*um2U-9mCkjVLFL75fDlpjg.jpeg" /><figcaption>Image from <a href="https://unsplash.com/s/photos/data-collection">Unsplash</a></figcaption></figure><p>It can be difficult for someone just starting out in data science to obtain the data they need to work on personal projects. It’s likely that you’ve invested a considerable amount of time searching the internet for interesting datasets that you can use in your project. In light of this, I would like to provide you with a list of ten websites that you can consult in order to find a solution to your issue.</p><p><strong>What exactly is a dataset, then?</strong><br>A collection of information is known as a dataset. It’s important to note that when working with tables, each column represents a specific variable, and every row represents a record in the dataset. In other words, each record in the data set corresponds to a specific variable.</p><p>Generally speaking, there are many different formats for datasets; however, during a public search, you will most likely come across only two of these formats. The following are some of them: <strong>“.xlsx”</strong> is an Excel file extension; <strong>“.csv”</strong> is a Comma Separated Values file extension.<br><strong><em>So, let’s dive into our top ten dataset resources.</em></strong></p><h3><strong>1. Kaggle</strong></h3><p>This is one of the data science platforms that is utilized the most, and it features a comprehensive collection of datasets in addition to a set of tools that are especially helpful for novice users. In addition to offering a course catalog, it also plays host to a number of other kinds of competitions that are held within the industry. Incredibly large amounts of information may be sent about within the community, in my view, which is a wonderful thing. On this platform, you are able to learn new material, perfect your skills, compete against others, and talk about your thoughts. See <a href="https://www.kaggle.com/"><em>Link</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/352/1*9pjZw0NF25m6UiTuXOqsUA.png" /><figcaption>Logo from<a href="http://www.kaggle.com/"> Kaggle</a></figcaption></figure><p><strong>2. World Bank Open Data</strong></p><p>You are encouraged to use the global development data warehouse to do research on a certain nation or indication, and doing so is not only totally free but also available to the general public. This platform is also useful for academic scholars who are searching for datasets to include in their theses or other projects they are working on. It incorporates a vast collection of datasets derived from locations all around the world. See <a href="https://www.worldbank.org/en/home"><em>Link</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/577/1*v3G5y85MJ-6MlMYsr9o6HA.png" /><figcaption>Logo from <a href="http://www.worldbank.org/en/home">The World Bank</a></figcaption></figure><h3>3. Data. World</h3><p>If you use the <a href="https://data.world/"><strong><em>data.world</em></strong></a> platform, you will have access to free datasets and will even be able to work on some of them directly on the website. You will have access to three distinct projects that are absolutely free of charge if you simply register for a free account and log in. Alternately, if you need to upgrade to a storage space that is substantially larger than what you already have, you can choose from the several pricing plans that are available to you.<br>Utilizing this website’s search bar will allow you to hunt for particular phrases, resources, organizations, or people of interest to you. And if you want to be even more specific, you can locate exactly what you’re looking for by clicking the button that reads <em>“Create advanced filter.”</em> from the drop-down menu. See <a href="https://data.world/"><em>Link</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*aOZnBCXHfRqmYs8KbhHnQQ.png" /><figcaption>Logo from <a href="http://www.data.world/">data.world</a></figcaption></figure><h3>4. FiveThirtyEight</h3><p>Without a shadow of a doubt, this website is among the very greatest examples of data journalism now available online. This particular resource stands out from the rest due to the fact that it is organized somewhat differently than the others. This incredible platform covers a wide range of topics, including politics, science, and sports, and it also provides access to the platform’s underlying source code and data. The fact that it is completely open source is the most beneficial aspect about it. When you sign up for the service using your email address, you will begin receiving the newsletter in the mailbox you have designated for receiving it. See <a href="https://fivethirtyeight.com/"><em>Link</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*AYbzxZ_oOF0XXtCXQ_O3uQ.png" /><figcaption>Logo from <a href="http://www.fivethirtyeight.com/">FiveThirtyEight</a></figcaption></figure><h3>5. Data.gov</h3><p>Data.gov is a new website that is part of an effort in the United States to make the government more accessible. Users in the United States can get data from many different federal departments by using the Data.gov website. The information could be about anything, from how much the government spends to how well students do on standardized tests. Most of the data needs to be looked into more, and it’s not always easy to tell if the information in the data collection is the “real” version or not. Anyone can get the information. But to get access to some data sets, you have to do more, like agree to the terms of a licensing agreement. The data can be downloaded for free by anyone who wants to. See <a href="https://data.gov/"><em>Link</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/561/1*zvulZhsGZ6neSgxumNHq_w.png" /><figcaption>Logo from<a href="http://www.data.gov/"> Data.Gov</a></figcaption></figure><h3>6. UCI Machine Learning Repository</h3><p>The University of California, Irvine (UCI) is one of the earliest data sources that was ever put on the internet. There is a dataset available online that dates all the way back to 1987. The user interface is really straightforward and well-organized. You have the option of browsing based on the default task, attribute type, data type, or area of expertise. See <a href="https://archive.ics.uci.edu/ml/index.php"><em>Link</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*_SG9nVNPmdtjFOIMmN3Z9w.png" /><figcaption>Logo from <a href="https://archive.ics.uci.edu/ml/index.php">UCI Machine Learning Repository</a></figcaption></figure><h3>7. Nasdaq Data Link</h3><p>This is a place where economic and financial data are held. Some of this data is free, but you have to pay for many of the data sets. It can be used to make models that predict economic indicators or stock prices. Because there are so many data sets, it’s possible to make a complicated model that uses values from many data sets to predict values from another. See <a href="https://data.nasdaq.com/"><em>Link</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/681/1*tCTpUib9KnUw72lDcVT2_Q.png" /><figcaption>Logo from <a href="https://data.nasdaq.com/">Nasdaq Data Link</a></figcaption></figure><h3>8. Google Dataset Search</h3><p>Google’s Dataset Search project made it possible to find and download public datasets for free. It’s as easy to use as a regular Google search — just type in the name or topic you want to look up in the bar. As you type, it will keep suggesting datasets that have the exact keyword you’re looking for, so you might find something completely new and interesting. See <a href="https://datasetsearch.research.google.com/"><em>Link</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*ekrD5geXkcNUg7FYuMfN3w.png" /><figcaption>Logo from <a href="https://datasetsearch.research.google.com/">Google Dataset Search</a></figcaption></figure><h3>9. NASA</h3><p>NASA is a government agency that receives funding from the general public, all of its data is available to the general public. It maintains websites where its datasets linked to earth science and datasets relating to space can be downloaded by anyone, and the website is publicly accessible. On the site devoted to earth science, you can even sort by format to see, for instance, all of the CSV datasets that are currently available. See <a href="https://www.earthdata.nasa.gov/"><em>Link</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/593/1*1L-zzVgyk8DncSrO41F_9Q.png" /><figcaption>Logo from <a href="https://www.earthdata.nasa.gov/">EarthData</a></figcaption></figure><h3>10. DataHub</h3><p><strong>DataHub </strong>is a Software as a Service (SaaS) data-publishing platform that offers the most diverse collection of public datasets organized by topic. What’s fascinating about <strong>DataHub </strong>is that it includes a documentation section as well as tutorials on how to use its features to generate visualizations and manage massive datasets online. See <a href="https://datahub.io/collections"><em>Link</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/156/1*ZjdszMEWGD4gK4M6_fP8gw.png" /><figcaption>Logo from <a href="https://datahub.io/collections">DataHub</a></figcaption></figure><h3>Bonus</h3><ol><li>BuzzFeed. <a href="https://github.com/BuzzFeedNews/everything"><em>Link</em></a></li><li>Academic Torrents. <a href="https://academictorrents.com/browse.php?cat=6"><em>Link</em></a></li><li>Humanitarian Data Exchange. <a href="https://data.humdata.org/dataset"><em>Link</em></a></li></ol><p>Happy learning!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=170b9ebdd46e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>